diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-04 16:24:32 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-04 16:24:32 +0200 |
commit | 703a8044b5393d37d355b0b1054a9a5a13912a3f (patch) | |
tree | ae0769683f198fcaeb7c75e32bceca7d65319b4a | |
parent | 35d88f4e2ff5dcd9904f04612d5febede996137c (diff) | |
download | vim-git-703a8044b5393d37d355b0b1054a9a5a13912a3f.tar.gz |
patch 7.4.1890v7.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.
-rw-r--r-- | src/gui_gtk_x11.c | 6 | ||||
-rw-r--r-- | src/gui_mac.c | 5 | ||||
-rw-r--r-- | src/gui_photon.c | 6 | ||||
-rw-r--r-- | src/gui_w32.c | 6 | ||||
-rw-r--r-- | src/gui_x11.c | 6 | ||||
-rw-r--r-- | src/proto/gui_gtk_x11.pro | 1 | ||||
-rw-r--r-- | src/proto/gui_mac.pro | 1 | ||||
-rw-r--r-- | src/proto/gui_photon.pro | 1 | ||||
-rw-r--r-- | src/proto/gui_w32.pro | 1 | ||||
-rw-r--r-- | src/proto/gui_x11.pro | 1 | ||||
-rw-r--r-- | src/screen.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
12 files changed, 40 insertions, 1 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index d497c7530..601fafccd 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -810,6 +810,12 @@ gui_gtk_is_blink_on(void) } #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 8990b0566..06f92044b 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -5114,6 +5114,11 @@ gui_mch_destroy_scrollbar(scrollbar_T *sb) #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 956c8e206..a4d00f783 100644 --- a/src/gui_photon.c +++ b/src/gui_photon.c @@ -2232,6 +2232,12 @@ gui_mch_draw_part_cursor(int w, int h, guicolor_T color) 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 2c665cb46..d506f000d 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -540,6 +540,12 @@ static long_u blink_ontime = 400; 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 7d01e79dc..deed76e9e 100644 --- a/src/gui_x11.c +++ b/src/gui_x11.c @@ -3155,6 +3155,12 @@ static long_u blink_ontime = 400; 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 7e94b58d2..3735f8d31 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 9e7f54f75..ff837594b 100644 --- a/src/proto/gui_mac.pro +++ b/src/proto/gui_mac.pro @@ -14,6 +14,7 @@ void gui_mac_handle_menu(long menuChoice); 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 d8efe0711..46d73b741 100644 --- a/src/proto/gui_photon.pro +++ b/src/proto/gui_photon.pro @@ -39,6 +39,7 @@ void gui_mch_insert_lines(int row, int num_lines); 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 c8411f96c..e35373c60 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 d4eb2d9ab..2d2eafade 100644 --- a/src/proto/gui_x11.pro +++ b/src/proto/gui_x11.pro @@ -53,6 +53,7 @@ void gui_mch_menu_grey(vimmenu_T *menu, int grey); 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 2e425cba4..ea557b98d 100644 --- a/src/screen.c +++ b/src/screen.c @@ -432,7 +432,10 @@ redraw_after_callback() #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 4ab1a255b..ce8b8d0a6 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1890, +/**/ 1889, /**/ 1888, |