-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix cursor position bugs related to o and O #281
Conversation
- `O` at the beginning of file didn't move cursor - `o` and `O` messed up cursor position with multiple cursors Fixes helix-editor#127
4023a38
to
1275b73
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.
Nice, I was trying this out the other day but I didn't know you need to do change_by_selection
. Seemed bad that we need to keep a state around. The bug is fixed but the behavior seemed to be different from kakoune and vim. 10Oa
now does not write 10 a but instead just one a 10 lines above, I think this is a bit surprising.
The problem doesn't stem from using
It's deviant from vim and kakoune yeah but do we really need to keep that behavior in helix ? It feels at odds with the multiple cursor philosophy (this commit didn't change this behavior though, it previously did not write 10 a's either). |
This was already a problem before this PR, the implementation simply doesn't do that yet.
I do want this, 10o should make 10 lines and place a cursor on each. It's an easy way to start writing multiple lines with multiple cursors. |
How should counts before |
I think it's OK if counts on Do you want to do the change for |
I'll add it as a separate commit in this PR. Edit: Added counts |
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.
Verified on local. Thanks!
O
at the beginning of file didn't move cursoro
andO
messed up cursor position with multiple cursorsFixes #127