diff src/gui_mac.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 85a601f985ab
children 6559e98f3e74
line wrap: on
line diff
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -5156,9 +5156,10 @@ gui_mch_set_blinking(long wait, long on,
  * Stop the cursor blinking.  Show the cursor if it wasn't shown.
  */
     void
-gui_mch_stop_blink(void)
-{
-    gui_update_cursor(TRUE, FALSE);
+gui_mch_stop_blink(int may_call_gui_update_cursor)
+{
+    if (may_call_gui_update_cursor)
+	gui_update_cursor(TRUE, FALSE);
     /* TODO: TODO: TODO: TODO: */
 /*    gui_w32_rm_blink_timer();
     if (blink_state == BLINK_OFF)