Fix undo stack after autoindent