Skip to content

Pressing ↓ after browsing history with ↑ clears the editor #5494

@d3ara1n

Description

@d3ara1n

What happened?

In the pi TUI editor, when I press ↑ to browse input history and then press ↓ to go back, the editor gets cleared to empty instead of restoring what I had before browsing.

This is surprising because every shell (fish, zsh, bash) preserves your draft when navigating history — ↓ always brings you back to what you were typing before pressing ↑.

Steps to reproduce

  1. Submit a message so it's in history
  2. Press ↑ — you see your previous message ✓
  3. Press ↓ — editor is now empty (expected: return to pre-browse state)

Expected behavior

Pressing ↓ past the last history entry should restore whatever was in the editor before I pressed ↑, like fish/zsh/bash do.

Version

0.78.1

Metadata

Metadata

Assignees

Labels

inprogressIssue is being worked on

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions