Use window number when opening in new vsplit

This commit is contained in:
Parker Kemp 2017-07-24 15:32:59 -04:00
parent e2a9929bbe
commit eae5d02fa9

View File

@ -225,10 +225,12 @@ function! s:Opener._newVSplit()
call nerdtree#exec("wincmd p") call nerdtree#exec("wincmd p")
vnew vnew
let currentWin = winnr()
"resize the nerd tree back to the original size "resize the nerd tree back to the original size
call g:NERDTree.CursorToTreeWin() call g:NERDTree.CursorToTreeWin()
exec("silent vertical resize ". winwidth) exec("silent vertical resize ". winwidth)
call nerdtree#exec('wincmd p') exe currentWin . "wincmd w"
endfunction endfunction
"FUNCTION: Opener.open(target) {{{1 "FUNCTION: Opener.open(target) {{{1