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

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.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
h-east 2024-12-15 19:32:39 +01:00 committed by Christian Brabandt
parent 5a2e0cf5f1
commit b34622579c
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 5 additions and 1 deletions

View File

@ -6621,7 +6621,9 @@ gui_mch_draw_part_cursor(int w, int h, guicolor_T color)
void void
gui_mch_update(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); g_main_context_iteration(NULL, TRUE);
} }

View File

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