Skip to content

Mirror cursor breaks HTML tags #86978

Closed

Description

  • 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

Activity

  1. mrahhal commented on Dec 14, 2019

    @mrahhal
    Contributor

    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.

  2. yuc0n commented on Dec 14, 2019

    @yuc0n

    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.

  3. mrahhal commented on Dec 14, 2019

    @mrahhal
    Contributor

    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.

  4. secf4ult commented on Dec 15, 2019

    @secf4ult

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

  5. added
    bug
    html
    on Dec 17, 2019
  6. octref commented on Dec 18, 2019

    @octref
    Contributor
  7. added
    verified
    on Jan 29, 2020
  8. locked and limited conversation to collaborators on Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bughtmlverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions