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
|
"Saves the current cursor position in the current buffer and the window
|
||||||
"scroll position
|
"scroll position
|
||||||
function! s:UI.saveScreenState()
|
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()
|
let win = winnr()
|
||||||
try
|
|
||||||
call g:NERDTree.CursorToTreeWin()
|
call g:NERDTree.CursorToTreeWin()
|
||||||
let self._screenState = {}
|
let self._screenState = {}
|
||||||
let self._screenState['oldPos'] = getpos(".")
|
let self._screenState['oldPos'] = getpos(".")
|
||||||
let self._screenState['oldTopLine'] = line("w0")
|
let self._screenState['oldTopLine'] = line("w0")
|
||||||
let self._screenState['oldWindowSize']= winwidth("")
|
let self._screenState['oldWindowSize']= winwidth("")
|
||||||
call nerdtree#exec(win . "wincmd w")
|
call nerdtree#exec(win . "wincmd w")
|
||||||
catch /^NERDTree.InvalidOperationError/
|
|
||||||
endtry
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
"FUNCTION: s:UI._stripMarkup(line, removeLeadingSpaces){{{1
|
"FUNCTION: s:UI._stripMarkup(line, removeLeadingSpaces){{{1
|
||||||
|
Loading…
Reference in New Issue
Block a user