From 30b42407302e8d5a7d16551ce105648cde8000c5 Mon Sep 17 00:00:00 2001 From: Hirohito Higashi Date: Tue, 28 Apr 2026 19:19:53 +0000 Subject: [PATCH] runtime(doc): Update docs related to tabpanel closes: #20083 Signed-off-by: Hirohito Higashi Signed-off-by: Christian Brabandt --- runtime/doc/options.txt | 43 +++++++++++++++------------------------- runtime/doc/tabpage.txt | 35 ++++++++++++++------------------ runtime/doc/version9.txt | 6 +++--- 3 files changed, 34 insertions(+), 50 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index b3edc22e35..a0e450a432 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 9.2. Last change: 2026 Apr 27 +*options.txt* For Vim version 9.2. Last change: 2026 Apr 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -9052,33 +9052,22 @@ A jump table for the options with a short description can be found at |Q_op|. Optional settings for the |tabpanel|, It can consist of the following items. Items must be separated by a comma. - align:{text} Specifies the position of the tabpanel. - Currently supported positions are: - - left left-side + align:{text} Specifies the position of the tabpanel. + Currently supported positions are: + left left-side (default) right right-side - - (default "left") - - columns:{n} Number of columns of the tabpanel. - If this value is 0 or less than 'columns', the - tabpanel will not be displayed. - (default 20) - - scrollbar Reserve a one-column scrollbar at the right - edge of the tabpanel showing the current - scroll position. The scrollbar uses the - |hl-PmenuSbar| and |hl-PmenuThumb| highlight - groups for the track and thumb respectively. - Clicking on the scrollbar column jumps the - thumb to that position; the thumb can also be - dragged. See |tabpanel-scroll|. - - vert Use a vertical separator for tabpanel. - The vertical separator character is taken from - "tpl_vert" in 'fillchars'. - (default off) - + columns:{n} Number of columns of the tabpanel. (default 20) + If this value is 0 or less than 'columns', the + tabpanel will not be displayed. + scrollbar A one-column scrollbar is always displayed at the + right edge of the tabpanel, regardless of the + "align:" setting. (default off) + See |tabpanel-scroll|. + vert The vertical separator is drawn at the boundary + between the tabpanel and the buffer area. + (default off) + The character to be drawn uses "tpl_vert" from + 'fillchars'. Examples: > :set tabpanelopt=columns:16,align:right :set tabpanelopt= diff --git a/runtime/doc/tabpage.txt b/runtime/doc/tabpage.txt index 88aeb4ad34..d6db4e8d04 100644 --- a/runtime/doc/tabpage.txt +++ b/runtime/doc/tabpage.txt @@ -1,4 +1,4 @@ -*tabpage.txt* For Vim version 9.2. Last change: 2026 Apr 27 +*tabpage.txt* For Vim version 9.2. Last change: 2026 Apr 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -482,42 +482,37 @@ The vertical separator character is taken from "tpl_vert" in 'fillchars'. You can customize the appearance of the tab page labels using the highlight groups: |hl-TabPanel| |hl-TabPanelSel| |hl-TabPanelFill| -SCROLLING IN THE TABPANEL: *tabpanel-scroll* +SCROLLING IN THE TABPANEL *tabpanel-scroll* When the total height of the tab page list exceeds the visible screen height, -mouse wheel events over the tabpanel area scroll the tab page list up or -down. The scroll step follows the 'mousescroll' setting. Wheel events -inside the tabpanel area are consumed by the tabpanel and do not trigger +mouse wheel events over the tabpanel area scroll the tab page list up or down. +The scroll step follows the 'mousescroll' setting. Wheel events inside the +tabpanel area are consumed by the tabpanel and do not trigger || or || mappings. -The current tab page is always brought into view: when the selected tab -page changes (by |gt|, |gT|, |:tabnext| etc.), the panel scrolls so the -current entry is visible. +The current tab page is always brought into view: when the selected tab page +changes (by |gt|, |gT|, |:tabnext| etc.), the panel scrolls so the current +entry is visible. To show a vertical scrollbar indicating the current scroll position, add "scrollbar" to 'tabpanelopt': > :set tabpanelopt+=scrollbar -A one-column scrollbar is always reserved at the right edge of the -tabpanel, regardless of 'align'. For |'tabpanelopt'|=align:left this is -the edge adjacent to the buffer windows; for align:right it is the right -edge of the screen. Clicking on the scrollbar column moves the thumb to -the click position, and the thumb can be dragged to scroll continuously. - -When "vert" is combined with "scrollbar", the vertical separator is drawn -at the tabpanel's boundary with the buffer area and the scrollbar stays at -the tabpanel's right edge. +A one-column scrollbar is always displayed at the right edge of the tabpanel, +regardless of the "align:" setting in 'tabpanelopt'. Clicking on the +scrollbar column moves the thumb to the click position, and the thumb can be +dragged to scroll continuously. The scrollbar uses the |hl-PmenuSbar| highlight group for the track and |hl-PmenuThumb| for the thumb. The scroll offset is remembered across redraws. -MOUSE CLICKS IN THE TABPANEL: *tabpanel-mouse* +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. +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 diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 725ba3326d..cc2f5f2dee 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -1,4 +1,4 @@ -*version9.txt* For Vim version 9.2. Last change: 2026 Apr 27 +*version9.txt* For Vim version 9.2. Last change: 2026 Apr 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -52616,8 +52616,8 @@ Other ~ - Allow mouse clickable regions in the 'statusline', 'tabline' and the 'tabpanel' using the |stl-%[FuncName]| atom. - Enable reflow support in the |:terminal|. -- Added "scrollbar" sub-option to 'tabpanelopt' so the tabpanel can scroll - when the tab page list exceeds the visible screen height. +- Enabled scrolling for the tabpanel when the tab page list exceeds the screen + height. Also added the "scrollbar" sub-option to 'tabpanelopt'. Platform specific ~ -----------------