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

Dual cursor appears on tag match and causes error when switching to Visual Line Mode in HTML file #4402

Open
mikenap opened this issue Dec 18, 2019 · 4 comments

Comments

@mikenap
Copy link

mikenap commented Dec 18, 2019

Describe the bug
When hovering over the beginning HTML tag of a pair, in Normal Mode, a second cursor appears on the closing tag. When switching to Visual Line Mode, with SHIFT + V, VS Code shows the message "ModeHandler: unexpected selection mode. selectionMode=4" and does not switch to Visual Line Mode.

To Reproduce
Create an HTML tag pair (i.e opening and closing div tags). In Normal Mode, place the cursor on either of the tag pair. A second cursor will appear on the opposite tag. Try switching to Visual Line Mode with SHIFT + V, the message "ModeHandler: unexpected selection mode. selectionMode=4" will appear and will not switch to Visual Line Mode and highlight the line.

Expected behavior
When placing the cursor on a beginning or closing HTML tag element, a second (or dual cursor) should not appear on the opening and closing HTML tags, and switching to Visual Line Mode with SHIFT + V should switch the editor to Visual Line Mode.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.12.2
  • VSCode version: 1.41.0
  • OS: macOS Mojave 10.14.6
@icemanx7
Copy link

I also experienced this on the following Environment:

  • VsCodeVim version: 1.12.2

  • VSCode version: 1.41.0-1

  • Arch Linux

@cvaldev
Copy link
Contributor

cvaldev commented Dec 18, 2019

This seems similar to #4378.

The extra cursor you are seeing is not being caused by the Vim extension. vscode added this feature in the November update: https://code.visualstudio.com/updates/v1_41#_html-mirror-cursor. You need to set html.mirrorCursorOnMatchingTag to false in your settings to have the behaviour you were expecting.

I was able to reproduce the error, on any file type, by just using VisualLine mode while multiple cursors are active.

@armoucar
Copy link

You need to set html.mirrorCursorOnMatchingTag to false in your settings to have the behaviour you were expecting.

That fixes the problem. But now I can't use % command for matching tag pairs :(

> Emmet: Go to matching Pair works though.

@Svtter
Copy link

Svtter commented Oct 7, 2020

This seems similar to #4378.

The extra cursor you are seeing is not being caused by the Vim extension. vscode added this feature in the November update: https://code.visualstudio.com/updates/v1_41#_html-mirror-cursor. You need to set html.mirrorCursorOnMatchingTag to false in your settings to have the behaviour you were expecting.

I was able to reproduce the error, on any file type, by just using VisualLine mode while multiple cursors are active.

It is editor.RenameOnType now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants