scrooloose/nerdtree — Issue #148: Improve handling when using NERDtree with a mouse
Author: fpauser
Created: 2012-03-07 12:46:17+00:00
State: open

To correct the very annoying "jumping-cursor-behavior" when switching between windows via mouse NERDtree should include the following snippet:

```
augroup NO_CURSOR_MOVE_ON_FOCUS
au!
au FocusLost * let g:oldmouse=&mouse | set mouse=
au FocusGained * if exists('g:oldmouse') | let &mouse=g:oldmouse | unlet g:oldmouse | endif
augroup END
```

Taken from http://vim.wikia.com/wiki/How_to_not_move_cursor_when_selecting_window_with_mouse