-
-
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
Odd behaviour with append_mode
collapse_selection
#9443
Comments
This is intentional: appending with |
There is no way this is intentional, because after the If after pressing |
Oh I see, I skipped over the part about helix/helix-term/src/commands.rs Lines 3654 to 3659 in 2661e05
Ideally it should not rely on that field and just figure out whether it needs to extend by looking only at the current selection. |
Well, I don't know if this helps, but I have found a psuedo-fix by adding an |
That is also with the custom If you're trying to avoid the selection behavior of |
Well, the cursor is not going to go to the next line because there is no next line. I should have expanded the screenshot to make it more clear. This is where both insert mode and append mode have the same behavior, which is to put the cursor after the last character. It doesn't seem to be affected by Also, the behavior with There was a helix configuration I saw a while ago where some Vim programmer recommended the bindings It isn't that I want to fully use it like vim, I just really thing that the selection looks jarring while I am typing. |
Oh I see, yeah if the buffer is empty then we can't move the selection over by one, and
Yeah, this is a common complaint. Other editors tend to punish you for having a selection (e.g. typing while you have a selection deletes the selection contents) but it's really important to the editing paradigm so I'd suggest trying it for a while (maybe a few weeks) and seeing if you can adjust. |
Well I seem to have found the code for the behaviour of going to normal. To be honest it makes zero sense to me because this behaviour only manifests at the end of the buffer? It seems from the code that helix/helix-view/src/editor.rs Lines 1903 to 1915 in 2661e05
|
When you enter insert mode with helix/helix-term/src/commands.rs Lines 2689 to 2694 in 2661e05
|
I see, when using |
Summary
I use helix, and I map a to
append_mode
collapse_selection
. There is an odd bug where the selection comes up again after pressing enter even though the last command collapsed the selection.Reproduction Steps
Write some text and then add a left parenthesis to generate a pair
Then press esc then a (which is mapped as above)
Now press enter
I expected this to happen:
Instead, this happened:
Helix log
~/.cache/helix/helix.log
Platform
Windows
Terminal Emulator
Windows Terminal
Installation Method
Scoop
Helix Version
helix 23.10 (f6021dd)
The text was updated successfully, but these errors were encountered: