You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Platform Linux x86_64 Terminal software Terminal independent. I've tried Alaritty and Ghostty
Describe the problem you are observing:
Steps to reproduce
Standard nulshell, with $env.config.edit_mode = vi
Press following keys starting from empty command line under insert mode, type foo123bar, then press keys: ESC, 6, h, v, l, l, s. This enters normal mode, move cursor on "1" and enter visual mode to select "123". The **bug behavior" is when pressing s key it only deletes character "3" but it should delete "123" altogether.
Recording
Claude Sonnet's analysis, FYI
The problem is that while the 's' key is properly handled in normal mode through the Command::SubstituteCharWithInsert command, there's no special handling for it in visual mode.
Here's what I found:
In vi/command.rs, the 's' key is parsed into Command::SubstituteCharWithInsert in normal mode
In vi/mod.rs, visual mode is entered when 'v' is pressed in normal mode
However, when in visual mode (ViMode::Visual), the code doesn't have special handling for the 's' command to delete the selection and enter insert mode
The fix would need to:
Add visual mode handling for the 's' key in the command parser
Make it behave similar to 'c' in visual mode (change/delete selection and enter insert mode)
The text was updated successfully, but these errors were encountered:
Platform Linux x86_64
Terminal software Terminal independent. I've tried Alaritty and Ghostty
Describe the problem you are observing:
Steps to reproduce
$env.config.edit_mode = vi
foo123bar
, then press keys:ESC, 6, h, v, l, l, s
. This enters normal mode, move cursor on "1" and enter visual mode to select "123". The **bug behavior" is when pressings
key it only deletes character "3" but it should delete "123" altogether.Recording
Claude Sonnet's analysis, FYI
The problem is that while the 's' key is properly handled in normal mode through the Command::SubstituteCharWithInsert command, there's no special handling for it in visual mode.
Here's what I found:
In vi/command.rs, the 's' key is parsed into Command::SubstituteCharWithInsert in normal mode
In vi/mod.rs, visual mode is entered when 'v' is pressed in normal mode
However, when in visual mode (ViMode::Visual), the code doesn't have special handling for the 's' command to delete the selection and enter insert mode
The fix would need to:
Add visual mode handling for the 's' key in the command parser
Make it behave similar to 'c' in visual mode (change/delete selection and enter insert mode)
The text was updated successfully, but these errors were encountered: