Save buffers when switching windows or buffers