Mercurial > vim
comparison src/gui.c @ 13152:f4c3a7f410f4 v8.0.1450
patch 8.0.1450: GUI: endless loop when stopping cursor blinking
commit https://github.com/vim/vim/commit/1dd45fb4f3371f0256653b2186c8b4b3d26b3f41
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 31 21:10:01 2018 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 31 Jan 2018 21:15:05 +0100 |
parents | 808625d4b71b |
children | bd1253c60938 |
comparison
equal
deleted
inserted
replaced
13151:3a3ecd0efd62 | 13152:f4c3a7f410f4 |
---|---|
1122 gui_mch_set_blinking(shape->blinkwait, | 1122 gui_mch_set_blinking(shape->blinkwait, |
1123 shape->blinkon, | 1123 shape->blinkon, |
1124 shape->blinkoff); | 1124 shape->blinkoff); |
1125 if (shape->blinkwait == 0 || shape->blinkon == 0 | 1125 if (shape->blinkwait == 0 || shape->blinkon == 0 |
1126 || shape->blinkoff == 0) | 1126 || shape->blinkoff == 0) |
1127 gui_mch_stop_blink(); | 1127 gui_mch_stop_blink(FALSE); |
1128 #ifdef FEAT_TERMINAL | 1128 #ifdef FEAT_TERMINAL |
1129 if (shape_bg != INVALCOLOR) | 1129 if (shape_bg != INVALCOLOR) |
1130 { | 1130 { |
1131 cattr = 0; | 1131 cattr = 0; |
1132 cfg = shape_fg; | 1132 cfg = shape_fg; |
2980 { | 2980 { |
2981 /* Blink when waiting for a character. Probably only does something | 2981 /* Blink when waiting for a character. Probably only does something |
2982 * for showmatch() */ | 2982 * for showmatch() */ |
2983 gui_mch_start_blink(); | 2983 gui_mch_start_blink(); |
2984 retval = gui_wait_for_chars_or_timer(wtime); | 2984 retval = gui_wait_for_chars_or_timer(wtime); |
2985 gui_mch_stop_blink(); | 2985 gui_mch_stop_blink(TRUE); |
2986 return retval; | 2986 return retval; |
2987 } | 2987 } |
2988 | 2988 |
2989 #if defined(ELAPSED_FUNC) && defined(FEAT_AUTOCMD) | 2989 #if defined(ELAPSED_FUNC) && defined(FEAT_AUTOCMD) |
2990 ELAPSED_INIT(start_tv); | 2990 ELAPSED_INIT(start_tv); |
3027 /* Blocking wait. */ | 3027 /* Blocking wait. */ |
3028 before_blocking(); | 3028 before_blocking(); |
3029 retval = gui_wait_for_chars_or_timer(-1L); | 3029 retval = gui_wait_for_chars_or_timer(-1L); |
3030 } | 3030 } |
3031 | 3031 |
3032 gui_mch_stop_blink(); | 3032 gui_mch_stop_blink(TRUE); |
3033 return retval; | 3033 return retval; |
3034 } | 3034 } |
3035 | 3035 |
3036 /* | 3036 /* |
3037 * Equivalent of mch_inchar() for the GUI. | 3037 * Equivalent of mch_inchar() for the GUI. |