Use event BufLeave instead of BufWinLeave to record screen state to avoid undefined b:NERDTree error
Use event BufLeave instead of BufWinLeave to record screen state. The BufWinLeave event also triggered when exiting(:qa), will cause an undefined b:NERDTree error.
This commit is contained in:
parent
eaa66aaf63
commit
98a5d1fca7
@ -148,7 +148,7 @@ call nerdtree#ui_glue#setupCommands()
|
||||
"============================================================
|
||||
augroup NERDTree
|
||||
"Save the cursor position whenever we close the nerd tree
|
||||
exec "autocmd BufWinLeave ". g:NERDTreeCreator.BufNamePrefix() ."* call b:NERDTree.ui.saveScreenState()"
|
||||
exec "autocmd BufLeave ". g:NERDTreeCreator.BufNamePrefix() ."* call b:NERDTree.ui.saveScreenState()"
|
||||
|
||||
"disallow insert mode in the NERDTree
|
||||
exec "autocmd BufEnter ". g:NERDTreeCreator.BufNamePrefix() ."* stopinsert"
|
||||
|
Loading…
Reference in New Issue
Block a user