vim-patch:9.1.0572: cannot specify tab page closing behaviour (#29682)

Problem:  cannot specify tab page closing behaviour
          (Gianluca Pacchiella)
Solution: Add the 'tabclose' option (LemonBoy).

fixes: vim/vim#5967
closes: vim/vim#15204

5247b0b92e

Co-authored-by: LemonBoy <thatlemon@gmail.com>
This commit is contained in:
zeertzjq
2024-07-13 08:56:58 +08:00
committed by GitHub
parent 10256bb760
commit b1aa8f5eb8
12 changed files with 161 additions and 11 deletions

View File

@@ -8506,6 +8506,30 @@ return {
type = 'string',
varname = 'p_syn',
},
{
abbreviation = 'tcl',
cb = 'did_set_tabclose',
defaults = { if_true = '' },
deny_duplicates = true,
desc = [=[
This option controls the behavior when closing tab pages (e.g., using
|:tabclose|). When empty Vim goes to the next (right) tab page.
Possible values (comma-separated list):
left If included, go to the previous tab page instead of
the next one.
uselast If included, go to the previously used tab page if
possible. This option takes precedence over the
others.
]=],
expand_cb = 'expand_set_tabclose',
full_name = 'tabclose',
list = 'onecomma',
scope = { 'global' },
short_desc = N_('which tab page to focus when closing a tab'),
type = 'string',
varname = 'p_tcl',
},
{
abbreviation = 'tal',
cb = 'did_set_tabline',