emmetio / sublime-text-plugin

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

wrap with abbreviation not working as expected in macros #153

Open old9 opened 3 years ago

old9 commented 3 years ago

When recorded and then played back in a macro, wrap with abbreviation reports an error in the console:

'EmmetWrapWithAbbreviation' object has no attribute 'wrap_entries'

It seem that some logic like this is missing in the def run block: https://github.com/emmetio/sublime-text-plugin/blob/843b50ed6dabe959d8f30ca7e78a956f31090246/main.py#L355-L379

When emmet_wrap_with_abbreviation is directly called from within a macro, wrap_entries is undefined then.

And since wrap_entries is always picked from the state of last widget input, it may also lead to other unexpected results?