`Move(Big)WordRightEnd` is off-by-1 in insert mode
Open
Nobody has claimed this yet.
A-ViKeybinding
bug
- Dominant language
- Rust
- Stars
- 818
- Forks
- 249
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 30
Description
Platform Linux (NixOS)
Terminal software Wezterm
Using nushell 0.91.0
Steps to reproduce
- In your nushell config, setup a keybind with:
{ name: move_to_end_word mode: [emacs vi_insert vi_normal] modifier: Alt keycode: Char_e event: {edit: MoveWordRightEnd} } { name: move_to_end_WORD mode: [emacs vi_insert vi_normal] modifier: Alt_Shift keycode: Char_E event: {edit: MoveBigWordRightEnd} } - Write
this is some/cmdin nushell - Put cursor on
sofsome, make sure you are in insert mode:
this is |some/cmd - Do
Alt-e, cursor is now betweenm&einstead of betweene&/:
this is som|e/cmd - Do
Alt-E, cursor is now betweenm&dinstead of at the end of the input buffer:
this is some/cm|d
Note that normal mode works okay, only insert mode isn't working correctly.
Screenshots/Screencaptures
https://github.com/nushell/reedline/assets/9730330/e722ee81-df56-4c77-9ca4-6a6fa898df8d
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
Reproduce the issue in nushell with the MoveWordRightEnd and MoveBigWordRightEnd keybindings, comparing vi insert mode with normal mode. Trace the implementations of these edit commands and their insert-mode handling; done means Alt-e stops after some and Alt-E reaches the end of some/cmd in insert mode while normal mode remains correct.
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
- Mostly clear
- Newbie friendliness
- 45/100