-
Notifications
You must be signed in to change notification settings - Fork 164
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
Improve Visual Mode Selection and Command Consistency #867
Conversation
202d51e
to
8b3bdfe
Compare
8b3bdfe
to
b2566f4
Compare
b2566f4
to
ff8a9da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling the VI mode, very much lacking and deserving attention!
49357f3
to
f033574
Compare
…t::ResetSelection
…d yield mode change from visual to insert/normal
f033574
to
57c2128
Compare
Minor note: Github incorrectly introduced another "participant" because I messed up my |
9066490
to
a478473
Compare
Trying out the visual selection while the Are we running into an unfortunate situation regarding the styling? (setting background for the selection and inverting it again for the cursor?) |
hey @deephbz would you be able to finish this one up? it looks like we should be good if the styling issue mentioned by @sholderbach is resolved? |
I cannot reproduce this. Below is my recording: Even if there's small rendering/styling issue, I think we could address that in future PRs given current PR functions well in a self-contained way and it's blocking others |
See my above reply |
hmm, I also can't reproduce it. I also tried using the demo example with |
(style issue is still there for me) In the interest of moving things along let's merge this and revisit the cursor styling in due time. |
Fix Vi Mode Visual Selection Behavior
This PR addresses several inconsistencies in Reedline's Vi mode implementation, particularly around visual mode and cut operations, making the behavior more aligned with standard Vim.
Changes
1. Visual Mode Selection Clearing
2. Cut Operations Consistency
x
,s
,d
, andc
commands to behave consistently with Vim standardsx
properly cut selection in visual mode instead of just one characterc
to enter insert mode after cutting selection3. Mode Transitions
DeleteChar
andDeleteToEnd
commandsTechnical Details
get_selection()
to include the last character in selection rangeTesting
The changes have been tested with the following scenarios:
Fixes #865 .
I've done
cargo fmt --all
,cargo clippy
, andcargo test
for each of these three commits.