General
Editor: Undo interface?
2008-12-05 07:53 UTC · Q (#249)
I wrote get_text and set_text methods on #2960, the new parent to the verb editor and soon the parent of all editors. These verbs are called whenever the old editor modified the .texts property directly on the editor (yuck.)
Basically, what this means for anyone using the editor is that I can write an undo command for the times you delete that line or whatever but don't want to abort and lose any good changes.
My question, then, is this:
How would you like it to work and look? I.E. We could save every change, even those created by undoing. So it would be like:
r2, undo to r1 and that becomes r3.
This would be quite nice, and probably the way I'm going to want to go with it, but what text should I show to the player to indicate what's changed? I can externally call diff via fup, and display a unified diff of the code, but that's a bit yucky. I could also just list all of the code after an undo. Does anyone have any thoughts or suggestions?
Thanks,
Q