-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fixes #1400, #612, #1632, #1634, #1531, #1458: Tab isn't handled properly for insert and visualblockinsert modes #1663
Conversation
Wow, this is great! Is it ready to go? |
@johnfn Alright just added tests. It should be ready to merge. |
This is a very bizarre bug. This is the test that's failing:
with the keys
(this is because of the cursor position; it's not skipping a line when it pastes. For example, if bar was in the register, it would be
). The bizarre part about this is that if the cursor is like this before the
it works fine. Looking at the returned vimState between the two cases, they look identical. |
I feel like it has to be an upstream issue, with how weird this bug is. It has nothing to do with |
I ended up fixing it by moving the cursor to the right before calling |
src/actions/commands/actions.ts
Outdated
@@ -462,7 +456,7 @@ class CommandEsc extends BaseCommand { | |||
} | |||
|
|||
if (vimState.currentMode === ModeName.EasyMotionMode) { | |||
// Escape or other termination keys were pressed, exit mode | |||
// Escaape or other termination keys were pressed, exit mode |
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.
typo
Is this good to go now? 😁 |
Except for that typo... |
The cool thing is that as a contributor I can fix that directly from GitHub. Here we gooo |
The reason I didn't say I completely fixed that refactor issue is that there's some visual block code I still haven't touched, related to visual block mode not in insert. |
So really, what I was doing in these commits was refactoring Visual Block Mode to use multicursors instead, where I also added my own code for handling Insert Mode Tab.
http://vimdoc.sourceforge.net/htmldoc/visual.html#blockwise-operators
Thus, this PR fixes (some of) #776, fixes #1400, fixes #612, fixes #1458, and fixes #1634.
I also added fixing #1531 into this one since its editing is a similar concept to visualblock.