patch 7.4.1890
Problem: GUI: When channel data is received the cursor blinking is
interrupted. (Ramel Eshed)
Solution: Don't update the cursor when it is blinking.
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index d497c75..601fafc 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -810,6 +810,12 @@
}
#endif
+ int
+gui_mch_is_blinking(void)
+{
+ return blink_state != BLINK_NONE;
+}
+
void
gui_mch_set_blinking(long waittime, long on, long off)
{
diff --git a/src/gui_mac.c b/src/gui_mac.c
index 8990b05..06f9204 100644
--- a/src/gui_mac.c
+++ b/src/gui_mac.c
@@ -5114,6 +5114,11 @@
#endif
}
+ int
+gui_mch_is_blinking(void)
+{
+ return FALSE;
+}
/*
* Cursor blink functions.
diff --git a/src/gui_photon.c b/src/gui_photon.c
index 956c8e2..a4d00f7 100644
--- a/src/gui_photon.c
+++ b/src/gui_photon.c
@@ -2232,6 +2232,12 @@
DRAW_END;
}
+ int
+gui_mch_is_blinking(void)
+{
+ return blink_state != BLINK_NONE;
+}
+
void
gui_mch_set_blinking(long wait, long on, long off)
{
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 2c665cb..d506f00 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -540,6 +540,12 @@
static long_u blink_offtime = 250;
static UINT blink_timer = 0;
+ int
+gui_mch_is_blinking(void)
+{
+ return blink_state != BLINK_NONE;
+}
+
void
gui_mch_set_blinking(long wait, long on, long off)
{
diff --git a/src/gui_x11.c b/src/gui_x11.c
index 7d01e79..deed76e 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -3155,6 +3155,12 @@
static long_u blink_offtime = 250;
static XtIntervalId blink_timer = (XtIntervalId)0;
+ int
+gui_mch_is_blinking(void)
+{
+ return blink_state != BLINK_NONE;
+}
+
void
gui_mch_set_blinking(long waittime, long on, long off)
{
diff --git a/src/proto/gui_gtk_x11.pro b/src/proto/gui_gtk_x11.pro
index 7e94b58..3735f8d 100644
--- a/src/proto/gui_gtk_x11.pro
+++ b/src/proto/gui_gtk_x11.pro
@@ -1,6 +1,7 @@
/* gui_gtk_x11.c */
void gui_mch_prepare(int *argc, char **argv);
void gui_mch_free_all(void);
+int gui_mch_is_blinking(void);
void gui_mch_set_blinking(long waittime, long on, long off);
void gui_mch_stop_blink(void);
void gui_mch_start_blink(void);
diff --git a/src/proto/gui_mac.pro b/src/proto/gui_mac.pro
index 9e7f54f..ff83759 100644
--- a/src/proto/gui_mac.pro
+++ b/src/proto/gui_mac.pro
@@ -14,6 +14,7 @@
void gui_mac_focus_change(EventRecord *event);
void gui_mac_update(EventRecord *event);
short gui_mch_get_mac_menu_item_index(vimmenu_T *menu, vimmenu_T *parent);
+int gui_mch_is_blinking(void);
void gui_mch_set_blinking(long wait, long on, long off);
void gui_mch_stop_blink(void);
void gui_mch_start_blink(void);
diff --git a/src/proto/gui_photon.pro b/src/proto/gui_photon.pro
index d8efe07..46d73b7 100644
--- a/src/proto/gui_photon.pro
+++ b/src/proto/gui_photon.pro
@@ -39,6 +39,7 @@
void gui_mch_draw_string(int row, int col, char_u *s, int len, int flags);
void gui_mch_draw_hollow_cursor(guicolor_T color);
void gui_mch_draw_part_cursor(int w, int h, guicolor_T color);
+int gui_mch_is_blinking(void);
void gui_mch_set_blinking(long wait, long on, long off);
void gui_mch_start_blink(void);
void gui_mch_stop_blink(void);
diff --git a/src/proto/gui_w32.pro b/src/proto/gui_w32.pro
index c8411f9..e35373c 100644
--- a/src/proto/gui_w32.pro
+++ b/src/proto/gui_w32.pro
@@ -1,6 +1,7 @@
/* gui_w32.c */
int directx_enabled(void);
int gui_mch_set_rendering_options(char_u *s);
+int gui_mch_is_blinking(void);
void gui_mch_set_blinking(long wait, long on, long off);
void gui_mch_stop_blink(void);
void gui_mch_start_blink(void);
diff --git a/src/proto/gui_x11.pro b/src/proto/gui_x11.pro
index d4eb2d9..2d2eafa 100644
--- a/src/proto/gui_x11.pro
+++ b/src/proto/gui_x11.pro
@@ -53,6 +53,7 @@
void gui_mch_menu_hidden(vimmenu_T *menu, int hidden);
void gui_mch_draw_menubar(void);
void gui_x11_menu_cb(Widget w, XtPointer client_data, XtPointer call_data);
+int gui_mch_is_blinking(void);
void gui_mch_set_blinking(long waittime, long on, long off);
void gui_mch_stop_blink(void);
void gui_mch_start_blink(void);
diff --git a/src/screen.c b/src/screen.c
index 2e425cb..ea557b9 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -432,7 +432,10 @@
#ifdef FEAT_GUI
if (gui.in_use)
{
- gui_update_cursor(TRUE, FALSE);
+ /* Don't update the cursor while it is blinking, it will get
+ * updated soon and this avoids interrupting the blinking. */
+ if (!gui_mch_is_blinking())
+ gui_update_cursor(FALSE, FALSE);
gui_mch_flush();
}
#endif
diff --git a/src/version.c b/src/version.c
index 4ab1a25..ce8b8d0 100644
--- a/src/version.c
+++ b/src/version.c
@@ -754,6 +754,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1890,
+/**/
1889,
/**/
1888,