Skip to content
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

Add Cursor to Line Ends Errors From Visual Line Mode #4270

Closed
ralphcallaway opened this issue Nov 15, 2019 · 2 comments · Fixed by #4584
Closed

Add Cursor to Line Ends Errors From Visual Line Mode #4270

ralphcallaway opened this issue Nov 15, 2019 · 2 comments · Fixed by #4584

Comments

@ralphcallaway
Copy link

Describe the bug
When trying to go from visual line mode to multi-cursor mode encountering an unexpected selection mode that is difficult to recover from

To Reproduce
Steps to reproduce the behavior:

  1. open text file with more than a couple lines
  2. V (enter visual line)
  3. 5j (select five lines)
  4. super-L (add cursors to line ends, cmd-shift-l is the default key binding on mac os x)
  5. Get ModeHandler: unexpected selection mode. selectionMode=4 error
  6. Click 'Dismiss'
  7. Immediately get same error
  8. Sometimes I can my way out of this and can continue, sometimes I can't get rid of the error, but can continue working, sometimes i just toggle vim mode and revert back to pre vim ways

Expected behavior
Enter some sort of multi-cursor mode without errors (personally, I'd like to be in normal multi-cursor mode)

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.11.3
  • VSCode version: 1.40.1
  • OS: Mac 10.14.6

Additional context
I fell in love with multi-cursors before vim, and admittedly the two styles kind of fight with each other. But now that I'm getting to be slightly comfortable with vim, I really want to be able to use the normal mode command and motions with multiple cursors.

My $0.02 is that regardless of the current mode, any multi-cursor action should put you into normal multi-cursor mode, and if you want a different mode proceed from there.

@J-Fields
Copy link
Member

J-Fields commented Jan 9, 2020

If you have multiple cursors and try to start visual line mode with V, I see the same issue. It's likely the same root cause.

@J-Fields J-Fields added this to the v1.13.0 milestone Jan 9, 2020
@ralphcallaway
Copy link
Author

fwiw if you stick in a strictly vim command context this works just fine

  • V start visual line mode
  • 5j select some lines
  • I/A enter multi-line insert mode with cursors at start/end of line respectively

J-Fields added a commit that referenced this issue Feb 23, 2020
Fixes #4270
This could use test cases, but frankly, it seems to work and this would just blow up prior to now, so I'll make a note of that and come back to it later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants