mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-25 09:41:03 +08:00
Force NERDTreeFocus to allow events to be fired when switching windows.
This commit is contained in:
parent
5e77fb2fef
commit
a7d585f7af
|
@ -96,9 +96,9 @@ endfunction
|
|||
|
||||
"FUNCTION: s:NERDTree.CursorToTreeWin(){{{1
|
||||
"Places the cursor in the nerd tree window
|
||||
function! s:NERDTree.CursorToTreeWin()
|
||||
function! s:NERDTree.CursorToTreeWin(...)
|
||||
call g:NERDTree.MustBeOpen()
|
||||
call nerdtree#exec(g:NERDTree.GetWinNum() . 'wincmd w', 1)
|
||||
call nerdtree#exec(g:NERDTree.GetWinNum() . 'wincmd w', a:0 >0 ? a:1 : 1)
|
||||
endfunction
|
||||
|
||||
" Function: s:NERDTree.ExistsForBuffer() {{{1
|
||||
|
|
|
@ -217,7 +217,7 @@ endfunction
|
|||
|
||||
function! NERDTreeFocus()
|
||||
if g:NERDTree.IsOpen()
|
||||
call g:NERDTree.CursorToTreeWin()
|
||||
call g:NERDTree.CursorToTreeWin(0)
|
||||
else
|
||||
call g:NERDTreeCreator.ToggleTabTree('')
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user