bugfix for secondary trees occurring when the screen state is saved
This commit is contained in:
parent
09e1dbec10
commit
7270212214
@ -325,16 +325,20 @@ endfunction
|
||||
"Saves the current cursor position in the current buffer and the window
|
||||
"scroll position
|
||||
function! s:UI.saveScreenState()
|
||||
|
||||
"FIXME: b:NERDTreeType should really me moved to b:NERDTree.type. Update
|
||||
"this when that refactor is done
|
||||
if b:NERDTreeType == "secondary"
|
||||
return
|
||||
endif
|
||||
|
||||
let win = winnr()
|
||||
try
|
||||
call g:NERDTree.CursorToTreeWin()
|
||||
let self._screenState = {}
|
||||
let self._screenState['oldPos'] = getpos(".")
|
||||
let self._screenState['oldTopLine'] = line("w0")
|
||||
let self._screenState['oldWindowSize']= winwidth("")
|
||||
call nerdtree#exec(win . "wincmd w")
|
||||
catch /^NERDTree.InvalidOperationError/
|
||||
endtry
|
||||
endfunction
|
||||
|
||||
"FUNCTION: s:UI._stripMarkup(line, removeLeadingSpaces){{{1
|
||||
|
Loading…
Reference in New Issue
Block a user