-*tabpage.txt* For Vim version 9.2. Last change: 2026 Apr 25
+*tabpage.txt* For Vim version 9.2. Last change: 2026 Apr 26
VIM REFERENCE MANUAL by Bram Moolenaar
The scroll offset is remembered across redraws but is reset when "scroll" or
"scrollbar" is toggled off and back on.
+MOUSE CLICKS IN THE TABPANEL: *tabpanel-mouse*
+
+A left click on a row in the tabpanel selects the tab page that the row
+belongs to. Unlike the tabline, a double click in the tabpanel does not
+open a new, empty tab page; it is treated the same as a single click.
+
+For finer-grained control, the 'tabpanel' value may contain |stl-%[FuncName]|
+click regions. Clicks on those regions are dispatched to the callback
+function instead of falling through to tab selection.
+
==============================================================================
6. Setting 'guitablabel' *setting-guitablabel*
tabpagenr() builtin.txt /*tabpagenr()*
tabpagewinnr() builtin.txt /*tabpagewinnr()*
tabpanel tabpage.txt /*tabpanel*
+tabpanel-mouse tabpage.txt /*tabpanel-mouse*
tabpanel-scroll tabpage.txt /*tabpanel-scroll*
tag tagsrch.txt /*tag*
tag-! tagsrch.txt /*tag-!*
c1 = tp_label.nr;
if (c1 >= 0)
{
- if ((mod_mask & MOD_MASK_MULTI_CLICK) == MOD_MASK_2CLICK)
+ if ((mod_mask & MOD_MASK_MULTI_CLICK) == MOD_MASK_2CLICK
+ && !tp_label.is_panel)
{
- // double click opens new page
+ // Double-click on the tabline opens a new, empty tab page.
+ // The tabpanel has no "empty area" (every row maps to a tab)
+ // and this behavior is not documented for tabpanel, so fall
+ // through to the regular tab-switch path there.
end_visual_mode_keep_button();
tabpage_new();
tabpage_move(c1 == 0 ? 9999 : c1 - 1);
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 397,
/**/
396,
/**/