From ace799a50444859e96f9c3f3179a726b453a3c10 Mon Sep 17 00:00:00 2001 From: ichizok Date: Fri, 2 Feb 2018 15:48:10 +0900 Subject: [PATCH] Fix: stopBlink checks whether should update cursor --- src/MacVim/MMBackend.h | 2 +- src/MacVim/MMBackend.m | 4 ++-- src/MacVim/gui_macvim.m | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/MacVim/MMBackend.h b/src/MacVim/MMBackend.h index 756228891b..733578af76 100644 --- a/src/MacVim/MMBackend.h +++ b/src/MacVim/MMBackend.h @@ -121,7 +121,7 @@ extern NSTimeInterval MMBalloonEvalInternalDelay; - (void)setMouseShape:(int)shape; - (void)setBlinkWait:(int)wait on:(int)on off:(int)off; - (void)startBlink; -- (void)stopBlink; +- (void)stopBlink:(BOOL)updateCursor; - (void)adjustLinespace:(int)linespace; - (void)adjustColumnspace:(int)columnspace; - (void)activate; diff --git a/src/MacVim/MMBackend.m b/src/MacVim/MMBackend.m index 12a1d96e2a..fa9ddfa774 100644 --- a/src/MacVim/MMBackend.m +++ b/src/MacVim/MMBackend.m @@ -1078,9 +1078,9 @@ extern GuiFont gui_mch_retain_font(GuiFont font); } } -- (void)stopBlink +- (void)stopBlink:(BOOL)updateCursor { - if (MMBlinkStateOff == blinkState) { + if (MMBlinkStateOff == blinkState && updateCursor) { gui_update_cursor(TRUE, FALSE); [self flushQueue:YES]; } diff --git a/src/MacVim/gui_macvim.m b/src/MacVim/gui_macvim.m index f3e9842ab7..c872772160 100644 --- a/src/MacVim/gui_macvim.m +++ b/src/MacVim/gui_macvim.m @@ -1254,9 +1254,7 @@ gui_mch_start_blink(void) void gui_mch_stop_blink(int may_call_gui_update_cursor) { - if (may_call_gui_update_cursor) - gui_update_cursor(TRUE, FALSE); - [[MMBackend sharedInstance] stopBlink]; + [[MMBackend sharedInstance] stopBlink:may_call_gui_update_cursor]; }