I want to make my plugin transparent to end user like this:
def on_modified(self, view):
command = view.command_history(0)
if command[0] == 'my_command':
if _IT_IS_UNDO_:
view.run_command('undo')
elif _IT_IS_REDO_:
view.run_command('redo')
But the Undo and Redo commands don’t appear in command_history(), so how can I know is it a undo or redo command in on_modified?
Thanks for helping.