Open evandrocoan opened 4 years ago
This is because Sublime Text joins together non-modifying commands that happen shortly after another. If you wait between each alt+d
press then those will have separate entries in the undo stack.
There currently isn't a way for plugins to control this, so I'll take this issue to track adding such a feature.
Description
Create this keybinding on your user settings
Create the plugin bug.py
Expected behavior
Alt+D
3 timesCtrl+U
(soft_undo)Actual behavior
Alt+D
3 timesCtrl+U
(soft_undo)Workaround
A fix or workaround for this problem was figured out accidentally by @OdatNurd and @mattst on https://forum.sublimetext.com/t/plugin-soft-undo/40064
If you create the bug.py by using two text commands chained by a
sublime.set_timeout()
, everything works as expected:Environment
10 build 15063 x64
1920x1080
1.0
3207
Related threads