Keep undo when switching buffers