formulahendry / vscode-auto-rename-tag

Automatically rename paired HTML/XML tag
https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag
MIT License
262 stars 36 forks source link

Editing a nested single letter tag with multiple selections malfunctions #106

Open JaronMLifsey opened 5 years ago

JaronMLifsey commented 5 years ago

VS Code Version: 1.30.1 Extension Version: 0.0.15

To reproduce:

  1. enter: "<p>test <p>test</p> test</p>"
  2. select the second 'p' and then, while holding alt, the third.
  3. press 'b'

The first 'p' changes to a 'b'

c2t0bdoiok

tdd commented 5 years ago

What would you want the behavior to be here? Just avoid auto-rename in multi-caret mode? The logic for auto-renaming here seems super dangerous, I would favor that the ext requires single-cursor (and makes it explicit in the docs).

JaronMLifsey commented 5 years ago

Ya, that'd be good. I like the extension, but when combined with another one I use to wrap selected text with a tag, it becomes dangerous to use. Oh, and thanks for sharing your extension!