0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

patch 9.1.0572: cannot specify tab page closing behaviour

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

fixes: #5967
closes: #15204

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
LemonBoy
2024-07-12 19:30:58 +02:00
committed by Christian Brabandt
parent 74703f1086
commit 5247b0b92e
17 changed files with 141 additions and 16 deletions

View File

@@ -3782,15 +3782,23 @@ win_altframe(
static tabpage_T *
alt_tabpage(void)
{
tabpage_T *tp;
tabpage_T *tp = NULL;
int forward;
// Use the next tab page if possible.
if (curtab->tp_next != NULL)
return curtab->tp_next;
// Use the last accessed tab page, if possible.
if ((tcl_flags & TCL_USELAST) && valid_tabpage(lastused_tabpage))
return lastused_tabpage;
// Use the previous tab page, if possible.
forward = curtab->tp_next != NULL &&
((tcl_flags & TCL_LEFT) == 0 || curtab == first_tabpage);
if (forward)
tp = curtab->tp_next;
else
for (tp = first_tabpage; tp->tp_next != curtab; tp = tp->tp_next)
;
// Find the last but one tab page.
for (tp = first_tabpage; tp->tp_next != curtab; tp = tp->tp_next)
;
return tp;
}