mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-11 12:53:49 -05:00
fix lots of no-name buffers being created
Previously every time the tree window was created a new [no-name] buffer was being created (visible with :ls!). Avoid this by creating the window with split, not new
This commit is contained in:
@@ -2355,7 +2355,7 @@ function! s:createTreeWin()
|
|||||||
"create the nerd tree window
|
"create the nerd tree window
|
||||||
let splitLocation = g:NERDTreeWinPos ==# "left" ? "topleft " : "botright "
|
let splitLocation = g:NERDTreeWinPos ==# "left" ? "topleft " : "botright "
|
||||||
let splitSize = g:NERDTreeWinSize
|
let splitSize = g:NERDTreeWinSize
|
||||||
silent! exec splitLocation . 'vertical ' . splitSize . ' new'
|
silent! exec splitLocation . 'vertical ' . splitSize . ' split'
|
||||||
|
|
||||||
if !exists('t:NERDTreeBufName')
|
if !exists('t:NERDTreeBufName')
|
||||||
let t:NERDTreeBufName = s:nextBufferName()
|
let t:NERDTreeBufName = s:nextBufferName()
|
||||||
|
|||||||
Reference in New Issue
Block a user