Skip to content

Commit

Permalink
Correct local variable namespace
Browse files Browse the repository at this point in the history
NERDTree keeps 'No Name' buffer after deleting current node 'md' preservim#755 (closes preservim#755) preservim#756
  • Loading branch information
mboughaba committed Nov 1, 2017
1 parent 69e2990 commit b2268e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nerdtree_plugin/fs_menu.vim
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ function! s:promptToDelBuffer(bufnum, msg)
" Go to the next buffer in buffer list if at least one extra buffer is listed
" Otherwise open a new empty buffer
if v:version >= 800
let s:listedBufferCount = len(getbufinfo({'buflisted':1}))
let l:listedBufferCount = len(getbufinfo({'buflisted':1}))
elseif v:version >= 702
let s:listedBufferCount = len(filter(range(1, bufnr('$')), 'buflisted(v:val)'))
let l:listedBufferCount = len(filter(range(1, bufnr('$')), 'buflisted(v:val)'))
else
" Ignore buffer count in this case to make sure we keep the old
" behavior
let s:listedBufferCount = 0
let l:listedBufferCount = 0
endif
if s:listedBufferCount > 1
if l:listedBufferCount > 1
exec "tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':bnext! ' | endif"
else
exec "tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':enew! ' | endif"
Expand Down

0 comments on commit b2268e2

Please sign in to comment.