emmetio / sublime-text-plugin

The essential toolkit for web-developers
https://emmet.io
MIT License
253 stars 29 forks source link

Random wrap with abbreviation behavior #149

Closed charroma closed 3 years ago

charroma commented 3 years ago

Since the plugin rewrite, the wrap with abbreviation keyboard shortcut sometimes does a random action instead of the desired one.

Some exemples of weird actions:

After the weird behavior occured once on a file, it works fine for some time. I don't know exactly what triggers it, but most of the time, it's the first time I use the shortcut on a file. It can reoccur later though.

I managed to reproduce a version of it with a new document and use the shortcut for the first time.

After the weird replacement, I undo (cmd+Z) and reuse the shortcut (cmd+space) and it works. In the console, with sublime.log_commands(True), it shows the correct command. It's not only related to a syntax change with the palette because it also happens with documents already on the right syntax. It's probably related to the command palette in general.

https://user-images.githubusercontent.com/65042439/102908536-99480c00-4445-11eb-8686-0474f3b8ef7f.mov https://user-images.githubusercontent.com/65042439/102910192-29875080-4448-11eb-9059-8b4486d093bb.mov

old9 commented 3 years ago

Same issue here, I tested this on a fresh installed Sublime Text 3 and installed Emmet as the only package, set up a short key for Wrap with Abbreviation (copied from the default commented key settings), and the first time I press the short key (Ctrl+Shift+G), some random thing happens.

I can reproduce this by first invoking some other command, say sort lines, and then pressing the short key again. And even worse, after this random command, Ctrl+Shift+P stops working until I press it several times.

sergeche commented 3 years ago

Which version of ST you’re using? I can’t reproduce this issue, when I repeat steps you’ve described, everything works fine

charroma commented 3 years ago

I am using 3.3.2, Build 3211. Unregistered (if this matter)

old9 commented 3 years ago

Mine the same, 3.3.2 build 3211, on a Windows 10 64bit 20H2 box.

old9 commented 3 years ago

Not a python guy but I did some more test

sergeche commented 3 years ago

Maybe you have another plugin/action that bound to your shortcut? It may happen if something updates or reloads plugin, like on autoupdate or some process that touches plugin files

charroma commented 3 years ago

It's not the case. I changed the shortcut to a really precise shortcut ("ctrl+q", "ctrl+w", "ctrl+e", "ctrl+r") and the result is the same.

After the bug, occurs, the command palette doesnt open the next time.

charroma commented 3 years ago

Can't recreate the problem with Sublime 4.