]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0930: tests: test_terminal2 may hang in GUI mode v9.1.0930
authorh-east <h.east.727@gmail.com>
Sun, 15 Dec 2024 18:32:39 +0000 (19:32 +0100)
committerChristian Brabandt <cb@256bit.org>
Sun, 15 Dec 2024 18:32:39 +0000 (19:32 +0100)
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.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/gui_gtk_x11.c
src/version.c

index c037702ad9c7c210aa8848472fb6bc15ad3ffc38..284be308898eb97754ba5d04c64b3ed75c5e67de 100644 (file)
@@ -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);
 }
 
index 3f9d8003b832296f2e9b551e97f761a268ce32b6..66bbbe8875c51e4f90bf6f65bd81014cea3be604 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    930,
 /**/
     929,
 /**/