Skip to content

Selection in emacs mode includes one additional character #922

@Jiogo18

Description

@Jiogo18

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions