mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
bugfix for win trees when using "stay in current win" command variants
Previously maps like T would not restore the cursor position. Not sure why the code was like this in the first place... hopefully I haven't just broken a bunch of shit. Closes #146.
This commit is contained in:
@@ -247,16 +247,9 @@ function! s:Opener._openFile()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
call self._gotoTargetWin()
|
call self._gotoTargetWin()
|
||||||
|
call self._path.edit()
|
||||||
if self._nerdtree.isWinTree()
|
if self._stay
|
||||||
call self._path.edit()
|
call self._restoreCursorPos()
|
||||||
else
|
|
||||||
call self._path.edit()
|
|
||||||
|
|
||||||
|
|
||||||
if self._stay
|
|
||||||
call self._restoreCursorPos()
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user