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

Emmet - "remove tag" + "Ctrl+Z" are making an unnecessary closing tag #39545

Closed
user3323 opened this issue Dec 4, 2017 · 4 comments
Closed
Assignees
Labels
html HTML support issues

Comments

@user3323
Copy link

user3323 commented Dec 4, 2017

  • VSCode Version: 1.19.0-ins
  • OS Version: win7x64

If there is a div, that written in one line, and we will try to remove it (Ctrl+L) and then return back (Ctrl+Z) - everything is fine.
But if the div (or any other tag) is expanded, returning it back by pressing Ctrl+Z, will return one more unnecessary closing tag.

emmet - remove tag

@vscodebot vscodebot bot added the emmet Emmet related issues label Dec 4, 2017
@huguinho27
Copy link

I'll try to fix this, if possible. May I?

@ramya-rao-a ramya-rao-a added html HTML support issues and removed emmet Emmet related issues labels Dec 4, 2017
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Dec 4, 2017

This is happening due to the auto-close feature kicking in.

@aeschli Repro steps are

  • Have this in an html file
<div>

</div>
  • Keep the cursor in between the opening and closing tag
  • Run the command Emmet: Remove Tag. This uses the TextEditorEdit to remove the tag.
  • Ctrl+Z

Now the auto close feature kicks in adds the extra </div>

@huguinho27 Sure you can give it a try.

@ramya-rao-a ramya-rao-a assigned aeschli and unassigned ramya-rao-a Dec 4, 2017
@aeschli
Copy link
Contributor

aeschli commented Dec 5, 2017

dup of #34484

@JacksonKearl
Copy link
Contributor

We can address this incarnation of the issue by just testing if the edit also inserted the closing tag, but that doesn't help with the root cause. Not sure if the "remove tag/undo" operation happens enough for this to be worthwhile

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
html HTML support issues
Projects
None yet
Development

No branches or pull requests

5 participants