Make tab operations undoable