Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selection in VI visual mode need to include the last character (+1 grapheme to the right) #843

Open
blindFS opened this issue Oct 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@blindFS
Copy link
Contributor

blindFS commented Oct 10, 2024

Platform macOS
Terminal software wezterm

Screen.Recording.2024-10-10.at.18.56.51.mov

This is not what a traditional vim behavior where current character "a" should be included in both directions.
Basically, the end offset returned by get_selection should be increased to the next grapheme.

Steps to reproduce

  1. set editor mode to vi
  2. press v to visual selection

Seems that crate::core_editor::Editor should be aware of current edit mode in order to fix this issue.

@blindFS blindFS added the bug Something isn't working label Oct 10, 2024
@fdncred
Copy link
Collaborator

fdncred commented Oct 10, 2024

seems like a reasonable request. i also wish the coloring was maybe just the reverse of whatever the text is. it's so hard to see, but that's a separate issue.

@blindFS
Copy link
Contributor Author

blindFS commented Oct 10, 2024

seems like a reasonable request. i also wish the coloring was maybe just the reverse of whatever the text is. it's so hard to see, but that's a separate issue.

Yes, there's exposed API with_visual_selection_style in engine.rs but never get called in nushell.
Reversed color is a cooler idea.

@fdncred
Copy link
Collaborator

fdncred commented Oct 10, 2024

nushell/nushell#14052

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants