redoPop / SublimeGremlins

Reveal odd and invisible whitespace characters in Sublime Text.
43 stars 3 forks source link

The plugin forces the Undo action to undo 1 character at a time #11

Closed mortalis13 closed 3 years ago

mortalis13 commented 3 years ago

Hi. I discovered that the on_modified_async() method causes that the Undo function works incorrectly. https://github.com/redoPop/SublimeGremlins/blob/f58d96f46df2b8c57514ac811908560b3851e36a/Gremlins.py#L175

Specifically, if a command is run from that method (with run_command('...')).

Could you check that in your environment? Test case:

Thanks.

redoPop commented 3 years ago

Thanks, this is a great catch. Appreciate the clear STR, too.

Fixed via 9149429 in v1.1.2: I moved the highlight_all_gremlins behavior into a helper method so it can be called without using run_command.