forked from aniani/vim
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.
This commit is contained in:
@@ -818,6 +818,12 @@ gui_mch_is_blinking(void)
|
|||||||
return blink_state != BLINK_NONE;
|
return blink_state != BLINK_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
gui_mch_is_blink_off(void)
|
||||||
|
{
|
||||||
|
return blink_state == BLINK_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gui_mch_set_blinking(long waittime, long on, long off)
|
gui_mch_set_blinking(long waittime, long on, long off)
|
||||||
{
|
{
|
||||||
|
@@ -5116,6 +5116,12 @@ gui_mch_destroy_scrollbar(scrollbar_T *sb)
|
|||||||
|
|
||||||
int
|
int
|
||||||
gui_mch_is_blinking(void)
|
gui_mch_is_blinking(void)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
gui_mch_is_blink_off(void)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@@ -2238,6 +2238,12 @@ gui_mch_is_blinking(void)
|
|||||||
return blink_state != BLINK_NONE;
|
return blink_state != BLINK_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
gui_mch_is_blink_off(void)
|
||||||
|
{
|
||||||
|
return blink_state == BLINK_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gui_mch_set_blinking(long wait, long on, long off)
|
gui_mch_set_blinking(long wait, long on, long off)
|
||||||
{
|
{
|
||||||
|
@@ -546,6 +546,12 @@ gui_mch_is_blinking(void)
|
|||||||
return blink_state != BLINK_NONE;
|
return blink_state != BLINK_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
gui_mch_is_blink_off(void)
|
||||||
|
{
|
||||||
|
return blink_state == BLINK_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gui_mch_set_blinking(long wait, long on, long off)
|
gui_mch_set_blinking(long wait, long on, long off)
|
||||||
{
|
{
|
||||||
|
@@ -3161,6 +3161,12 @@ gui_mch_is_blinking(void)
|
|||||||
return blink_state != BLINK_NONE;
|
return blink_state != BLINK_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
gui_mch_is_blink_off(void)
|
||||||
|
{
|
||||||
|
return blink_state == BLINK_OFF;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gui_mch_set_blinking(long waittime, long on, long off)
|
gui_mch_set_blinking(long waittime, long on, long off)
|
||||||
{
|
{
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
void gui_mch_prepare(int *argc, char **argv);
|
void gui_mch_prepare(int *argc, char **argv);
|
||||||
void gui_mch_free_all(void);
|
void gui_mch_free_all(void);
|
||||||
int gui_mch_is_blinking(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_set_blinking(long waittime, long on, long off);
|
||||||
void gui_mch_stop_blink(void);
|
void gui_mch_stop_blink(void);
|
||||||
void gui_mch_start_blink(void);
|
void gui_mch_start_blink(void);
|
||||||
|
@@ -15,6 +15,7 @@ void gui_mac_focus_change(EventRecord *event);
|
|||||||
void gui_mac_update(EventRecord *event);
|
void gui_mac_update(EventRecord *event);
|
||||||
short gui_mch_get_mac_menu_item_index(vimmenu_T *menu, vimmenu_T *parent);
|
short gui_mch_get_mac_menu_item_index(vimmenu_T *menu, vimmenu_T *parent);
|
||||||
int gui_mch_is_blinking(void);
|
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_set_blinking(long wait, long on, long off);
|
||||||
void gui_mch_stop_blink(void);
|
void gui_mch_stop_blink(void);
|
||||||
void gui_mch_start_blink(void);
|
void gui_mch_start_blink(void);
|
||||||
|
@@ -40,6 +40,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_hollow_cursor(guicolor_T color);
|
||||||
void gui_mch_draw_part_cursor(int w, int h, 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_blinking(void);
|
||||||
|
int gui_mch_is_blink_off(void);
|
||||||
void gui_mch_set_blinking(long wait, long on, long off);
|
void gui_mch_set_blinking(long wait, long on, long off);
|
||||||
void gui_mch_start_blink(void);
|
void gui_mch_start_blink(void);
|
||||||
void gui_mch_stop_blink(void);
|
void gui_mch_stop_blink(void);
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
int directx_enabled(void);
|
int directx_enabled(void);
|
||||||
int gui_mch_set_rendering_options(char_u *s);
|
int gui_mch_set_rendering_options(char_u *s);
|
||||||
int gui_mch_is_blinking(void);
|
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_set_blinking(long wait, long on, long off);
|
||||||
void gui_mch_stop_blink(void);
|
void gui_mch_stop_blink(void);
|
||||||
void gui_mch_start_blink(void);
|
void gui_mch_start_blink(void);
|
||||||
|
@@ -54,6 +54,7 @@ void gui_mch_menu_hidden(vimmenu_T *menu, int hidden);
|
|||||||
void gui_mch_draw_menubar(void);
|
void gui_mch_draw_menubar(void);
|
||||||
void gui_x11_menu_cb(Widget w, XtPointer client_data, XtPointer call_data);
|
void gui_x11_menu_cb(Widget w, XtPointer client_data, XtPointer call_data);
|
||||||
int gui_mch_is_blinking(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_set_blinking(long waittime, long on, long off);
|
||||||
void gui_mch_stop_blink(void);
|
void gui_mch_stop_blink(void);
|
||||||
void gui_mch_start_blink(void);
|
void gui_mch_start_blink(void);
|
||||||
|
@@ -432,9 +432,9 @@ redraw_after_callback(void)
|
|||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
if (gui.in_use)
|
if (gui.in_use)
|
||||||
{
|
{
|
||||||
/* Don't update the cursor while it is blinking, it will get
|
/* Don't update the cursor when it is blinking and off to avoid
|
||||||
* updated soon and this avoids interrupting the blinking. */
|
* flicker. */
|
||||||
if (!gui_mch_is_blinking())
|
if (!gui_mch_is_blink_off())
|
||||||
gui_update_cursor(FALSE, FALSE);
|
gui_update_cursor(FALSE, FALSE);
|
||||||
gui_mch_flush();
|
gui_mch_flush();
|
||||||
}
|
}
|
||||||
|
@@ -758,6 +758,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1995,
|
||||||
/**/
|
/**/
|
||||||
1994,
|
1994,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user