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

Mirror cursor breaks HTML tags #86978

Closed
juristr opened this issue Dec 14, 2019 · 5 comments · Fixed by #86986
Closed

Mirror cursor breaks HTML tags #86978

juristr opened this issue Dec 14, 2019 · 5 comments · Fixed by #86986
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug html HTML support issues verified Verification succeeded
Milestone

Comments

@juristr
Copy link

juristr commented Dec 14, 2019

  • VSCode Version: 1.42.0-insider
  • OS Version: macOS

Steps to Reproduce:

See the following gif:

vscodeissue

I first enter the ng-template tag which activates multicursor, then I use the key combi to select and jump to the end of the line, go one back and use "Backspace" to delete the attribute.

This is a common operation, but now with mirror cursors it might break the HTML as seen in the gif above. Moreover, if the opening & closing tag are further apart, one might not even notice the HTML is broken.

Does this issue occur when all extensions are disabled?: Yes

@mrahhal
Copy link
Contributor

mrahhal commented Dec 14, 2019

Also faced this quite a lot as this is a very common operation. Related to this is ctrl+shift selecting out of the element tag name.

I'd like to work on. The fix would be to exit mirror mode if the selection is not empty and we reach a none-matching state.

@yuc0n
Copy link

yuc0n commented Dec 14, 2019

This also brings up an issue when you try to add an attribute to multiple tags that have none.

Error
If you click the open tag, it'll select the opening and closing, and usually when you're at the end and you press space to type in the attribute it doesn't add the attributes to the closing tag, but when you're adding more cursors to the tags in other lines, it doesn't act like that anymore and adds the attributes to both tags.

I went crazy trying to find this to disable it.

@mrahhal
Copy link
Contributor

mrahhal commented Dec 14, 2019

@yuc0n Yeah looking at the current implementation, there's no support at all for multiple cursors. That's gonna take some work for the behavior to work correctly.

@secf4ult
Copy link

This feature doesn't work well with extension vim too, have to shut it down.

@octref octref added bug Issue identified by VS Code Team member as probable bug html HTML support issues labels Dec 17, 2019
@octref octref added this to the December/January 2020 milestone Dec 17, 2019
@octref
Copy link
Contributor

octref commented Dec 18, 2019

The fix will be available in https://code.visualstudio.com/insiders/ until next month's release.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug html HTML support issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants