Merge pull request #877 from scrooloose/replace_gt_with_tabnext

Use {count}tabnext to allow users to remap gt.
This commit is contained in:
Jason Franklin 2018-08-25 09:18:08 -04:00 committed by GitHub
commit b10c61b063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,6 @@ endfunction
" FUNCTION: Opener.open(target) {{{1
function! s:Opener.open(target)
if self._path.isDirectory
call self._openDirectory(a:target)
return
@ -303,7 +302,7 @@ endfunction
" FUNCTION: Opener._restoreCursorPos() {{{1
function! s:Opener._restoreCursorPos()
call nerdtree#exec('normal ' . self._tabnr . 'gt')
call nerdtree#exec(self._tabnr . 'tabnext')
call nerdtree#exec(bufwinnr(self._bufnr) . 'wincmd w')
endfunction
@ -332,7 +331,7 @@ function! s:Opener._reuseWindow()
let tabnr = self._path.tabnr()
if tabnr
call self._checkToCloseTree(1)
call nerdtree#exec('normal! ' . tabnr . 'gt')
call nerdtree#exec(tabnr . 'tabnext')
let winnr = bufwinnr('^' . self._path.str() . '$')
call nerdtree#exec(winnr . "wincmd w")
return 1