reedline icon indicating copy to clipboard operation
reedline copied to clipboard

Selection in emacs mode includes one additional character

Open Jiogo18 opened this issue 6 months ago • 1 comments

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

  1. cargo run --example basic or nushell with $env.config.edit_mode = "emacs"
  2. Write text 0123456789
  3. Select text with shift+left or shift+right
  4. 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

Jiogo18 avatar Jun 12 '25 23:06 Jiogo18

I implemented & tested https://github.com/nushell/reedline/pull/927, which fixes this described issue.

collinmurch avatar Jun 30 '25 03:06 collinmurch