Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compatible with incline.nvim #1419

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/nerdtree/opener.vim
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function! s:Opener._newSplit()
" Open the new window
try
call nerdtree#exec('wincmd p', 1)
call nerdtree#exec(splitMode . ' split',1)
call nerdtree#exec(splitMode . ' split', 0)
catch /^Vim\%((\a\+)\)\=:E37/
call g:NERDTree.CursorToTreeWin()
throw 'NERDTree.FileAlreadyOpenAndModifiedError: '. self._path.str() .' is already open and modified.'
Expand Down Expand Up @@ -193,7 +193,7 @@ function! s:Opener._newVSplit()
endif

call nerdtree#exec('wincmd p', 1)
call nerdtree#exec('vsplit', 1)
call nerdtree#exec('vsplit', 0)

let l:currentWindowNumber = winnr()

Expand Down Expand Up @@ -234,6 +234,7 @@ function! s:Opener._openFile()
endif

call self._path.edit()
doautocmd WinEnter
endfunction

" FUNCTION: Opener._openDirectory(node) {{{1
Expand Down Expand Up @@ -264,9 +265,9 @@ function! s:Opener._previousWindow()
else
try
if !self._isWindowUsable(winnr('#'))
call nerdtree#exec(self._firstUsableWindow() . 'wincmd w', 1)
call nerdtree#exec(self._firstUsableWindow() . 'wincmd w', 0)
else
call nerdtree#exec('wincmd p', 1)
call nerdtree#exec('wincmd p', 0)
endif
catch /^Vim\%((\a\+)\)\=:E37/
call g:NERDTree.CursorToTreeWin()
Expand Down
Loading