patch 9.1.1079: GUI late startup leads to uninitialized scrollbars

Commit: 
https://github.com/vim/vim/commit/a5e03f68a87d819896c81ff7cc3c668a2013c680
Author: Yee Cheng Chin <ychin....@gmail.com>
Date:   Thu Feb 6 21:18:17 2025 +0100

    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....@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/gui.c b/src/gui.c
index 86c40de63..bebd51af9 100644
--- 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);
diff --git a/src/version.c b/src/version.c
index 521fc8323..8fc6f602a 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1079,
 /**/
     1078,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1tg8Vh-00ArK7-Em%40256bit.org.

Raspunde prin e-mail lui