improve editor undo history