Sublime Forum

Soft undo not fire on_modified, not remove dirty sign

#1

soft-undo is one of my favorite feature of sublime text. Followers try to copy this feature, but lose the soul, once you make a modification their copied feature not work. Real soft-undo not only undoes selection changes, also undoes modifications. Only sublime text has this full feature as I know.

Bug 1:
When you run command ‘undo’, both events ‘on_selection_modified’ and ‘on_modified’ are fired, that’s okay;
When you run command ‘soft_undo’, and undo a selection change, only ‘on_selection_modified’ fired, that’s okay to;
When you run command ‘soft_undo’, and undo a modification, that should act the same as command ‘undo’, both events should be fired. But in fact, only ‘on_selection_modified’ fired, ‘on_modified’ not.

Bug 2:
When you run command ‘soft_undo’ and undo all modifications, view.is_dirty() returns ‘False’, but the dirty sign not be removed.

0 Likes