]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1079: GUI late startup leads to uninitialized scrollbars v9.1.1079
authorYee Cheng Chin <ychin.git@gmail.com>
Thu, 6 Feb 2025 20:18:17 +0000 (21:18 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 6 Feb 2025 20:18:17 +0000 (21:18 +0100)
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>
src/gui.c
src/version.c

index 86c40de632aa1ee961f98075e268917499b5b32f..bebd51af9684ea29e17c8b98065d647837e45b43 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -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);
index 521fc8323cadd8df7ef3ee3726c94d09beb3b6f9..8fc6f602a7de299b52970aa9447f3c08017c8051 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1079,
 /**/
     1078,
 /**/