mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-25 09:41:03 +08:00
Save/Set screen state also on WinLeave and WinEnter. (#1048)
* Save/Set screen state also on WinLeave and WinEnter. The particular use case here is when switching tabs with `gt` and the NERDTrees have been mirrored. * Update version number and change log.
This commit is contained in:
parent
4fe24d3156
commit
53eef21ad6
|
@ -1,6 +1,7 @@
|
|||
# Change Log
|
||||
|
||||
#### 6.1...
|
||||
- **.3**: Save/Set screen state also on WinLeave and WinEnter. (PhilRunninger) [#1048](https://github.com/scrooloose/nerdtree/pull/1048)
|
||||
- **.2**: Wrap saveScreenState's statements in a try-catch block. (PhilRunninger) [#1047](https://github.com/scrooloose/nerdtree/pull/1047)
|
||||
- **.1**: Catch errors when trying to read CHANGELOG.md. (PhilRunninger) [#1045](https://github.com/scrooloose/nerdtree/pull/1045)
|
||||
- **.0**: If file path doesn't exist, :NERDTreeFind its parent directory instead. (PhilRunninger) [#1043](https://github.com/scrooloose/nerdtree/pull/1043)
|
||||
|
|
|
@ -170,10 +170,10 @@ call nerdtree#ui_glue#setupCommands()
|
|||
"============================================================
|
||||
augroup NERDTree
|
||||
"Save the cursor position whenever we close the nerd tree
|
||||
exec "autocmd BufLeave ". g:NERDTreeCreator.BufNamePrefix() ."* if g:NERDTree.IsOpen() | call b:NERDTree.ui.saveScreenState() | endif"
|
||||
exec "autocmd BufLeave,WinLeave ". g:NERDTreeCreator.BufNamePrefix() ."* if g:NERDTree.IsOpen() | call b:NERDTree.ui.saveScreenState() | endif"
|
||||
|
||||
"disallow insert mode in the NERDTree
|
||||
exec "autocmd BufEnter ". g:NERDTreeCreator.BufNamePrefix() ."* stopinsert"
|
||||
exec "autocmd BufEnter,WinEnter ". g:NERDTreeCreator.BufNamePrefix() ."* stopinsert"
|
||||
augroup END
|
||||
|
||||
if g:NERDTreeHijackNetrw
|
||||
|
|
Loading…
Reference in New Issue
Block a user