Cursor position after up arrow history cycling is unconventional on multi-line statements
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 817
- Forks
- 247
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 30
Description
Platform macOS Tahoe
Terminal software WezTerm, but the behavior is the same in other Terminals
Steps to reproduce
- Hit the up arrow to cycle to any multi-line statement in history
- The cursor is at the end of the first line instead of the end of the multiline command
For example:
ls█ <-cursor after hitting up
::: | where type == file
Expected behavior:
ls
::: | where type == file█ <-cursor after hitting up
Screenshots/Screencaptures
Additional details
I could at least temporarily work around this issue if M-> (meta + greater than) was mapped for emacs mode, or G was mapped for vi mode to take me to the bottom, but neither is so I'm stuck arrowing around my commands.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the multi-line history case with the up arrow in the line editor, comparing the cursor location with the expected end-of-command position. Then trace the history-cycling and cursor-position handling, including the emacs and vi keymaps mentioned in the report; done means the cursor lands at the end of the recalled multi-line statement and the behavior is covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100