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:
Martin Grenfell
2015-11-26 19:52:40 +00:00
parent 0544ff524c
commit bbb819d696

View File

@@ -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