Skip to content

Commit

Permalink
Merge pull request #877 from scrooloose/replace_gt_with_tabnext
Browse files Browse the repository at this point in the history
Use {count}tabnext to allow users to remap gt.
  • Loading branch information
lifecrisis authored Aug 25, 2018
2 parents e653a68 + 39a89f5 commit b10c61b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/nerdtree/opener.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b10c61b

Please sign in to comment.