mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-25 09:41:03 +08:00
Merge pull request #844 from lifecrisis/clearjumps
Use ":clearjumps" in new NERDTree windows.
This commit is contained in:
commit
0788027b55
|
@ -178,24 +178,28 @@ function! s:Creator.createMirror()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: s:Creator._createTreeWin() {{{1
|
" FUNCTION: s:Creator._createTreeWin() {{{1
|
||||||
" Inits the NERD tree window. ie. opens it, sizes it, sets all the local
|
" Initialize the NERDTree window. Open the window, size it properly, set all
|
||||||
" options etc
|
" local options, etc.
|
||||||
function! s:Creator._createTreeWin()
|
function! s:Creator._createTreeWin()
|
||||||
"create the nerd tree window
|
let l:splitLocation = g:NERDTreeWinPos ==# 'left' ? 'topleft ' : 'botright '
|
||||||
let splitLocation = g:NERDTreeWinPos ==# "left" ? "topleft " : "botright "
|
let l:splitSize = g:NERDTreeWinSize
|
||||||
let splitSize = g:NERDTreeWinSize
|
|
||||||
|
|
||||||
if !g:NERDTree.ExistsForTab()
|
if !g:NERDTree.ExistsForTab()
|
||||||
let t:NERDTreeBufName = self._nextBufferName()
|
let t:NERDTreeBufName = self._nextBufferName()
|
||||||
silent! exec splitLocation . 'vertical ' . splitSize . ' new'
|
silent! execute l:splitLocation . 'vertical ' . l:splitSize . ' new'
|
||||||
silent! exec "edit " . t:NERDTreeBufName
|
silent! execute 'edit ' . t:NERDTreeBufName
|
||||||
else
|
else
|
||||||
silent! exec splitLocation . 'vertical ' . splitSize . ' split'
|
silent! execute l:splitLocation . 'vertical ' . l:splitSize . ' split'
|
||||||
silent! exec "buffer " . t:NERDTreeBufName
|
silent! execute 'buffer ' . t:NERDTreeBufName
|
||||||
|
endif
|
||||||
|
|
||||||
|
call self._setCommonBufOptions()
|
||||||
|
|
||||||
|
if has('patch-7.4.1925')
|
||||||
|
clearjumps
|
||||||
endif
|
endif
|
||||||
|
|
||||||
setlocal winfixwidth
|
setlocal winfixwidth
|
||||||
call self._setCommonBufOptions()
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" FUNCTION: s:Creator._isBufHidden(nr) {{{1
|
" FUNCTION: s:Creator._isBufHidden(nr) {{{1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user