0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

patch 9.1.1079: GUI late startup leads to uninitialized scrollbars

Problem:  GUI late startup leads to uninitialized scrollbars
Solution: initialize scrollbars for all windows in all tabpages
          (Yee Cheng Chin)

GUI startup was erroneously only initializing scrollbars for all windows
in current tab, instead of all tabs. This breaks if the user has created
tab pages before using `:gui` command to enter GUI mode, or sourced a
session file in vimrc.

closes: #16588
related: macvim-dev/macvim#862

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yee Cheng Chin 2025-02-06 21:18:17 +01:00 committed by Christian Brabandt
parent b69cd52447
commit a5e03f68a8
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 4 additions and 1 deletions

View File

@ -488,6 +488,7 @@ gui_init_check(void)
gui_init(void)
{
win_T *wp;
tabpage_T *tp;
static int recursive = 0;
/*
@ -695,7 +696,7 @@ gui_init(void)
gui_reset_scroll_region();
// Create initial scrollbars
FOR_ALL_WINDOWS(wp)
FOR_ALL_TAB_WINDOWS(tp, wp)
{
gui_create_scrollbar(&wp->w_scrollbars[SBAR_LEFT], SBAR_LEFT, wp);
gui_create_scrollbar(&wp->w_scrollbars[SBAR_RIGHT], SBAR_RIGHT, wp);

View File

@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1079,
/**/
1078,
/**/