implement undo/redo edits and shift+tab navigation