Patch 7.4.1995
Problem: GUI: cursor drawn in wrong place if a timer callback causes a
screen update. (David Samvelyan)
Solution: Also redraw the cursor when it's blinking and on.
Files: src/gui_gtk_x11.c, src/gui_mac.c, src/gui_photon.c, src/gui_w32.c,
src/gui_x11.c, src/screen.c, src/proto/gui_gtk_x11.pro,
src/proto/gui_mac.pro, src/proto/gui_photon.pro,
src/proto/gui_w32.pro, src/proto/gui_x11.pro
*** ../vim-7.4.1994/src/gui_gtk_x11.c 2016-06-08 21:17:39.049193558 +0200
--- src/gui_gtk_x11.c 2016-07-07 16:14:44.643932903 +0200
***************
*** 818,823 ****
--- 818,829 ----
return blink_state != BLINK_NONE;
}
+ int
+ gui_mch_is_blink_off(void)
+ {
+ return blink_state == BLINK_OFF;
+ }
+
void
gui_mch_set_blinking(long waittime, long on, long off)
{
*** ../vim-7.4.1994/src/gui_mac.c 2016-06-04 16:24:28.910189529 +0200
--- src/gui_mac.c 2016-07-07 16:15:55.254883969 +0200
***************
*** 5120,5125 ****
--- 5120,5131 ----
return FALSE;
}
+ int
+ gui_mch_is_blink_off(void)
+ {
+ return FALSE;
+ }
+
/*
* Cursor blink functions.
*
*** ../vim-7.4.1994/src/gui_photon.c 2016-06-04 16:24:28.914189529 +0200
--- src/gui_photon.c 2016-07-07 16:16:29.434376245 +0200
***************
*** 2238,2243 ****
--- 2238,2249 ----
return blink_state != BLINK_NONE;
}
+ int
+ gui_mch_is_blink_off(void)
+ {
+ return blink_state == BLINK_OFF;
+ }
+
void
gui_mch_set_blinking(long wait, long on, long off)
{
*** ../vim-7.4.1994/src/gui_w32.c 2016-06-08 21:17:39.049193558 +0200
--- src/gui_w32.c 2016-07-07 16:41:40.159934144 +0200
***************
*** 546,551 ****
--- 546,557 ----
return blink_state != BLINK_NONE;
}
+ int
+ gui_mch_is_blink_off(void)
+ {
+ return blink_state == BLINK_OFF;
+ }
+
void
gui_mch_set_blinking(long wait, long on, long off)
{
*** ../vim-7.4.1994/src/gui_x11.c 2016-06-04 16:24:28.914189529 +0200
--- src/gui_x11.c 2016-07-07 16:40:46.036737880 +0200
***************
*** 3161,3166 ****
--- 3161,3172 ----
return blink_state != BLINK_NONE;
}
+ int
+ gui_mch_is_blink_off(void)
+ {
+ return blink_state == BLINK_OFF;
+ }
+
void
gui_mch_set_blinking(long waittime, long on, long off)
{
*** ../vim-7.4.1994/src/screen.c 2016-06-17 13:18:44.471431927 +0200
--- src/screen.c 2016-07-07 16:42:46.694946119 +0200
***************
*** 432,440 ****
#ifdef FEAT_GUI
if (gui.in_use)
{
! /* 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();
}
--- 432,440 ----
#ifdef FEAT_GUI
if (gui.in_use)
{
! /* Don't update the cursor when it is blinking and off to avoid
! * flicker. */
! if (!gui_mch_is_blink_off())
gui_update_cursor(FALSE, FALSE);
gui_mch_flush();
}
*** ../vim-7.4.1994/src/proto/gui_gtk_x11.pro 2016-06-04 16:24:28.910189529
+0200
--- src/proto/gui_gtk_x11.pro 2016-07-07 16:17:27.221517860 +0200
***************
*** 2,7 ****
--- 2,8 ----
void gui_mch_prepare(int *argc, char **argv);
void gui_mch_free_all(void);
int gui_mch_is_blinking(void);
+ int gui_mch_is_blink_off(void);
void gui_mch_set_blinking(long waittime, long on, long off);
void gui_mch_stop_blink(void);
void gui_mch_start_blink(void);
*** ../vim-7.4.1994/src/proto/gui_mac.pro 2016-06-04 16:24:28.910189529
+0200
--- src/proto/gui_mac.pro 2016-07-07 16:17:20.061624212 +0200
***************
*** 15,20 ****
--- 15,21 ----
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);
+ int gui_mch_is_blink_off(void);
void gui_mch_set_blinking(long wait, long on, long off);
void gui_mch_stop_blink(void);
void gui_mch_start_blink(void);
*** ../vim-7.4.1994/src/proto/gui_photon.pro 2016-06-04 16:24:28.914189529
+0200
--- src/proto/gui_photon.pro 2016-07-07 16:17:33.341426954 +0200
***************
*** 40,45 ****
--- 40,46 ----
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);
+ int gui_mch_is_blink_off(void);
void gui_mch_set_blinking(long wait, long on, long off);
void gui_mch_start_blink(void);
void gui_mch_stop_blink(void);
*** ../vim-7.4.1994/src/proto/gui_w32.pro 2016-06-04 16:24:28.914189529
+0200
--- src/proto/gui_w32.pro 2016-07-07 16:18:51.048272726 +0200
***************
*** 2,7 ****
--- 2,8 ----
int directx_enabled(void);
int gui_mch_set_rendering_options(char_u *s);
int gui_mch_is_blinking(void);
+ int gui_mch_is_blink_off(void);
void gui_mch_set_blinking(long wait, long on, long off);
void gui_mch_stop_blink(void);
void gui_mch_start_blink(void);
*** ../vim-7.4.1994/src/proto/gui_x11.pro 2016-06-04 16:24:28.918189529
+0200
--- src/proto/gui_x11.pro 2016-07-07 16:40:51.352658937 +0200
***************
*** 54,59 ****
--- 54,60 ----
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);
+ int gui_mch_is_blink_off(void);
void gui_mch_set_blinking(long waittime, long on, long off);
void gui_mch_stop_blink(void);
void gui_mch_start_blink(void);
*** ../vim-7.4.1994/src/version.c 2016-07-07 16:35:11.533705793 +0200
--- src/version.c 2016-07-07 16:41:08.196408804 +0200
***************
*** 760,761 ****
--- 760,763 ----
{ /* Add new patch number below this line */
+ /**/
+ 1995,
/**/
--
hundred-and-one symptoms of being an internet addict:
218. Your spouse hands you a gift wrapped magnet with your PC's name
on it and you accuse him or her of genocide.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.