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)
62a232506d

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.
92b83ccfda
This commit is contained in:
Sean Dewar
2022-03-14 11:37:44 +00:00
parent 7e19c18a54
commit c5f190e0c2
8 changed files with 80 additions and 28 deletions

View File

@@ -448,10 +448,11 @@ EXTERN int aucmd_win_used INIT(= false); // aucmd_win is being used
EXTERN frame_T *topframe; // top of the window frame tree
// Tab pages are alternative topframes. "first_tabpage" points to the first
// one in the list, "curtab" is the current one.
// one in the list, "curtab" is the current one. "lastused_tabpage" is the
// last used one.
EXTERN tabpage_T *first_tabpage;
EXTERN tabpage_T *lastused_tabpage;
EXTERN tabpage_T *curtab;
EXTERN tabpage_T *lastused_tabpage;
EXTERN bool redraw_tabline INIT(= false); // need to redraw tabline
// Iterates over all tabs in the tab list