diff --git a/lib/nerdtree/nerdtree.vim b/lib/nerdtree/nerdtree.vim index 61a11a9..1af5346 100644 --- a/lib/nerdtree/nerdtree.vim +++ b/lib/nerdtree/nerdtree.vim @@ -144,7 +144,7 @@ function! s:NERDTree.GetWinNum() " If WindowTree, there is no t:NERDTreeBufName variable. Search all windows. for w in range(1,winnr('$')) - if bufname(winbufnr(w)) =~# '^' . g:NERDTreeCreator.BufNamePrefix() . '\d\+$' + if bufname(winbufnr(w)) =~# '^' . g:NERDTreeCreator.BufNamePrefix() . 'win_\d\+$' return w endif endfor