Clears undo history for codemirror when switching slides