mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-11 12:53:49 -05:00
Reintroduce necessary variable mistakenly removed. (#1040)
* Reintroduce lost variable: splitMode. * Add a space between splitMode and "split". `verticalsplit` is invalid. * Update version number, and add attributions (PR authors)
This commit is contained in:
@@ -158,12 +158,13 @@ function! s:Opener._newSplit()
|
||||
if onlyOneWin
|
||||
let &splitright = (g:NERDTreeWinPos ==# "left")
|
||||
endif
|
||||
" If only one window (ie. NERDTree), split vertically instead.
|
||||
let splitMode = onlyOneWin ? "vertical" : ""
|
||||
|
||||
" Open the new window
|
||||
try
|
||||
call nerdtree#exec('wincmd p', 1)
|
||||
" If only one window (ie. NERDTree), split vertically instead.
|
||||
call nerdtree#exec(onlyOneWin ? "vertical split" : "split",1)
|
||||
call nerdtree#exec(splitMode . " split",1)
|
||||
catch /^Vim\%((\a\+)\)\=:E37/
|
||||
call g:NERDTree.CursorToTreeWin()
|
||||
throw "NERDTree.FileAlreadyOpenAndModifiedError: ". self._path.str() ." is already open and modified."
|
||||
|
||||
Reference in New Issue
Block a user