Force NERDTreeFocus to allow events to be fired when switching windows.

This commit is contained in:
Phil Runninger 2020-05-04 07:59:25 -04:00
parent 5e77fb2fef
commit a7d585f7af
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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