diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-03-14 11:37:44 +0000 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2022-03-14 13:10:57 +0000 |
commit | c5f190e0c21b4e8465502fd9f260c3d49a4102ab (patch) | |
tree | 3a61df7a4281e6aa33b71fa1ae85c8e7c7bd5a8a /runtime | |
parent | 7e19c18a544b5f1f15cec0444385ddae80687a26 (diff) | |
download | rneovim-c5f190e0c21b4e8465502fd9f260c3d49a4102ab.tar.gz rneovim-c5f190e0c21b4e8465502fd9f260c3d49a4102ab.tar.bz2 rneovim-c5f190e0c21b4e8465502fd9f260c3d49a4102ab.zip |
vim-patch:8.2.1401: cannot jump to the last used tabpage
Problem: Cannot jump to the last used tabpage.
Solution: Add g<Tab> and tabpagnr('#'). (Yegappan Lakshmanan, closes vim/vim#6661,
neovim #11626)
https://github.com/vim/vim/commit/62a232506d06f6d1b3b7271801c907d6294dfe84
Nvim implemented this feature before Vim, but Vim made some useful changes (e.g:
beeping on failure). Port the changes to closer match Vim (also makes porting
future patches easier).
Also note that because CHECK_CMDWIN was added to goto_tabpage_tp, there is no
need to do the extra work with tabpage_index and goto_tabpage inside
goto_tabpage_lastused to fix cmdwin issues any more (#11692).
Note that while goto_tabpage_tp doesn't check for textlock like goto_tabpage
does, it shouldn't matter as it is already checked for earlier.
Add tags for <C-Tab> to tabpage.txt, and refer to <C-Tab> over CTRL-Tab to be
consistent with other docs like the patch.
Remove mention of "previous tabpage" (it can be confused with the tabpage to the
left, e.g: `:tabprevious`).
Similarly, don't rename old_curtab to last_tab in enter_tabpage (it might be
confused with the right-most tabpage, e.g: `:tablast`).
Cherry-pick Test_tabpage change from v8.2.0634.
https://github.com/vim/vim/commit/92b83ccfda7a1d654ccaaf161a9c8a8e01fbcf76
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/builtin.txt | 8 | ||||
-rw-r--r-- | runtime/doc/index.txt | 3 | ||||
-rw-r--r-- | runtime/doc/tabpage.txt | 7 |
3 files changed, 9 insertions, 9 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index ccc02e83b2..9eec23b7b7 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -8103,15 +8103,15 @@ tabpagebuflist([{arg}]) *tabpagebuflist()* tabpagenr([{arg}]) *tabpagenr()* The result is a Number, which is the number of the current tab page. The first tab page has number 1. + The optional argument {arg} supports the following values: $ the number of the last tab page (the tab page count). - # the number of the last accessed tab page (where - |g<Tab>| goes to). If there is no previous - tab page, 0 is returned. + # the number of the last accessed tab page + (where |g<Tab>| goes to). If there is no + previous tab page, 0 is returned. The number can be used with the |:tab| command. - tabpagewinnr({tabarg} [, {arg}]) *tabpagewinnr()* Like |winnr()| but for tab page {tabarg}. {tabarg} specifies the number of tab page to be used. diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index d02ab1b759..572b4e3f93 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -431,6 +431,7 @@ tag char note action in Normal mode ~ |<C-LeftMouse>| <C-LeftMouse> ":ta" to the keyword at the mouse click |<C-Right>| <C-Right> 1 same as "w" |<C-RightMouse>| <C-RightMouse> same as "CTRL-T" +|<C-Tab>| <C-Tab> same as "g<Tab>" |<Del>| ["x]<Del> 2 same as "x" |N<Del>| {count}<Del> remove the last digit from {count} |<Down>| <Down> 1 same as "j" @@ -577,7 +578,7 @@ tag command action in Normal mode ~ following the file name. |CTRL-W_gt| CTRL-W g t same as `gt`: go to next tab page |CTRL-W_gT| CTRL-W g T same as `gT`: go to previous tab page -|CTRL-W_g<Tab>| CTRL-W g <Tab> same as `g<Tab>` : go to last accessed tab +|CTRL-W_g<Tab>| CTRL-W g <Tab> same as |g<Tab>|: go to last accessed tab page |CTRL-W_h| CTRL-W h go to Nth left window (stop at first window) |CTRL-W_i| CTRL-W i split window and jump to declaration of diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 78b5101da7..f06a6bcc34 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -196,10 +196,6 @@ gt *i_CTRL-<PageDown>* *i_<C-PageDown>* {count}<C-PageDown> {count}gt Go to tab page {count}. The first tab page has number one. -CTRL-<Tab> *CTRL-<Tab>* -CTRL-W g<Tab> *g<Tab>* *CTRL-W_g<Tab>* -g<Tab> Go to previous (last accessed) tab page. - :tabp[revious] *:tabp* *:tabprevious* *gT* *:tabN* :tabN[ext] *:tabNext* *CTRL-<PageUp>* <C-PageUp> *<C-PageUp>* *i_CTRL-<PageUp>* *i_<C-PageUp>* @@ -219,6 +215,9 @@ gT Go to the previous tab page. Wraps around from the first one *:tabl* *:tablast* :tabl[ast] Go to the last tab page. +<C-Tab> *CTRL-<Tab>* *<C-Tab>* +CTRL-W g<Tab> *g<Tab>* *CTRL-W_g<Tab>* +g<Tab> Go to the last accessed tab page. Other commands: *:tabs* |