samedi 16 juillet 2016

Sublime Text Plugin: weird glitches with custom undo/redo commands

I'm writing custom undo/redo commands for sublime text 3 as part of a project I'm working on, and I've noticed two small glitches I can't figure out:

1: the first change in an open file can't be undone. for some reason the first change gets logged by my history.push_history(view)

2: for unknown reasons, deleting a segment of text, undoing it, and then redoing it causes the last two characters to be removed from history.event_history[id]['removals'][i] and the second-to-last to be moved to the end of history.event_history[id]['additions'][i].

Successive undos and redos will continue the problem

Aucun commentaire:

Enregistrer un commentaire