commit bbb819d69670e772a635150dd1ae37407e404b2e
parent 0544ff524c5209cf885984739dde941fd9fd37af
Author: Martin Grenfell <martin.grenfell@gmail.com>
Date: Thu, 26 Nov 2015 19:52:40 +0000
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.
Diffstat:
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/lib/nerdtree/opener.vim b/lib/nerdtree/opener.vim
@@ -247,16 +247,9 @@ function! s:Opener._openFile()
endif
call self._gotoTargetWin()
-
- if self._nerdtree.isWinTree()
- call self._path.edit()
- else
- call self._path.edit()
-
-
- if self._stay
- call self._restoreCursorPos()
- endif
+ call self._path.edit()
+ if self._stay
+ call self._restoreCursorPos()
endif
endfunction