0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.1450: GUI: endless loop when stopping cursor blinking

Problem:    Endless loop when gui_mch_stop_blink() is called while blink_state
            is BLINK_OFF. (zdohnal)
Solution:   Avoid calling gui_update_cursor() recursively.
This commit is contained in:
Bram Moolenaar
2018-01-31 21:10:01 +01:00
parent a338adcf22
commit 1dd45fb4f3
12 changed files with 29 additions and 26 deletions

View File

@@ -1124,7 +1124,7 @@ gui_update_cursor(
shape->blinkoff);
if (shape->blinkwait == 0 || shape->blinkon == 0
|| shape->blinkoff == 0)
gui_mch_stop_blink();
gui_mch_stop_blink(FALSE);
#ifdef FEAT_TERMINAL
if (shape_bg != INVALCOLOR)
{
@@ -2982,7 +2982,7 @@ gui_wait_for_chars(long wtime, int tb_change_cnt)
* for showmatch() */
gui_mch_start_blink();
retval = gui_wait_for_chars_or_timer(wtime);
gui_mch_stop_blink();
gui_mch_stop_blink(TRUE);
return retval;
}
@@ -3029,7 +3029,7 @@ gui_wait_for_chars(long wtime, int tb_change_cnt)
retval = gui_wait_for_chars_or_timer(-1L);
}
gui_mch_stop_blink();
gui_mch_stop_blink(TRUE);
return retval;
}