patch 9.1.0930: tests: test_terminal2 may hang in GUI mode

Commit: 
https://github.com/vim/vim/commit/b34622579ca2ffa701ea6cf27a09b17bf74e6f62
Author: h-east <h.east....@gmail.com>
Date:   Sun Dec 15 19:32:39 2024 +0100

    patch 9.1.0930: tests: test_terminal2 may hang in GUI mode
    
    Problem:  tests: test_terminal2 may hang in GUI mode
    Solution: break the loop in gui_mch_update() after at most 99 iterations
              (h-east)
    
    related: #16211
    
    Signed-off-by: h-east <h.east....@gmail.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index c037702ad..284be3088 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -6621,7 +6621,9 @@ gui_mch_draw_part_cursor(int w, int h, guicolor_T color)
     void
 gui_mch_update(void)
 {
-    while (g_main_context_pending(NULL) && !vim_is_input_buf_full())
+    int cnt = 0;       // prevent endless loop
+    while (g_main_context_pending(NULL) && !vim_is_input_buf_full()
+                                                               && ++cnt < 100)
        g_main_context_iteration(NULL, TRUE);
 }
 
diff --git a/src/version.c b/src/version.c
index 3f9d8003b..66bbbe887 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 */
+/**/
+    930,
 /**/
     929,
 /**/

-- 
-- 
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/E1tMtbz-00G3iz-FI%40256bit.org.

Raspunde prin e-mail lui