[vim/vim] Update last accessed tab page upon closing a tab (Issue #20965)

Igor Lacerda (Vim Github Repository) <[email protected]> Thu, 06 Aug 2026 19:26:43 -0700
Newsgroups gmane.editors.vim.devel
Message-ID <vim/vim/issues/[email protected]>
igorlfs created an issue (vim/vim#20965)

**Is your feature request about something that is currently impossible or hard to do? Please describe the problem.**
When using `<C-Tab>` to switch to the last accessed tab, closing the current tab turns the mapping into a NOOP, even if other tabs were accessed. It looks like the "last accessed tab" is just a single pointer, when it could be a "list".

More concretely:
1. `:tabnew`
2. `:tabnew`
3. `<C-Tab>`
4. `:tabclose`
5. `<C-Tab>` becomes NOOP, in spite of the first being accessed at some point

**Describe the solution you'd like**
Each tab should have a timestamp assigned to it (as in, its last access), and `<C-Tab>` should use this information to accurately switch to the last (accessed) tab, even after closing tabs. The implementation details don't matter too much, this is just the idea. 

**Describe alternatives you've considered**
This probably could be achieved with a remap and some autocmds, but it'd be nice to be a built-in feature.

**Additional context**
N/A


-- 
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/issues/20965
You are receiving this because you are subscribed to this thread.

Message ID: <vim/vim/issues/[email protected]>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/issues/20965%40github.com.