reedline
reedline copied to clipboard
Selection in emacs mode includes one additional character
Platform Windows 10, Arch Linux Terminal software Windows Terminal, Konsole, Alacritty
With Emacs edit mode, the first shift+left/right select 2 characters. Git bisect found #867, specifically editor.rs. It seems Vi mode and Emacs mode should behave differently here.
Steps to reproduce
cargo run --example basicor nushell with$env.config.edit_mode = "emacs"- Write text
0123456789 - Select text with shift+left or shift+right
- An additional character to the right is selected
Screenshots/Screencaptures
https://github.com/user-attachments/assets/b44f8646-9c08-4a70-94da-afe55a390adc Keys:
- shift+right, right
- delete
- undo
- shift+left, left
- delete
- undo
I implemented & tested https://github.com/nushell/reedline/pull/927, which fixes this described issue.