mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 7.4.2003
Problem: Still cursor flickering when a callback updates the screen. (David Samvelyan) Solution: Put the cursor in the right position after updating the screen.
This commit is contained in:
parent
a06ec8f345
commit
144445d15f
18
src/screen.c
18
src/screen.c
@ -422,7 +422,7 @@ redraw_after_callback(void)
|
|||||||
; /* do nothing */
|
; /* do nothing */
|
||||||
else if (State & CMDLINE)
|
else if (State & CMDLINE)
|
||||||
redrawcmdline();
|
redrawcmdline();
|
||||||
else if ((State & NORMAL) || (State & INSERT))
|
else if (State & (NORMAL | INSERT))
|
||||||
{
|
{
|
||||||
update_screen(0);
|
update_screen(0);
|
||||||
setcursor();
|
setcursor();
|
||||||
@ -486,8 +486,6 @@ update_curbuf(int type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* update_screen()
|
|
||||||
*
|
|
||||||
* Based on the current value of curwin->w_topline, transfer a screenfull
|
* Based on the current value of curwin->w_topline, transfer a screenfull
|
||||||
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
|
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
|
||||||
*/
|
*/
|
||||||
@ -499,6 +497,10 @@ update_screen(int type)
|
|||||||
#if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD)
|
#if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD)
|
||||||
int did_one;
|
int did_one;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef FEAT_GUI
|
||||||
|
int gui_cursor_col;
|
||||||
|
int gui_cursor_row;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Don't do anything if the screen structures are (not yet) valid. */
|
/* Don't do anything if the screen structures are (not yet) valid. */
|
||||||
if (!screen_valid(TRUE))
|
if (!screen_valid(TRUE))
|
||||||
@ -696,7 +698,11 @@ update_screen(int type)
|
|||||||
* scrolling may make it difficult to redraw the text under
|
* scrolling may make it difficult to redraw the text under
|
||||||
* it. */
|
* it. */
|
||||||
if (gui.in_use)
|
if (gui.in_use)
|
||||||
|
{
|
||||||
|
gui_cursor_col = gui.cursor_col;
|
||||||
|
gui_cursor_row = gui.cursor_row;
|
||||||
gui_undraw_cursor();
|
gui_undraw_cursor();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -752,7 +758,13 @@ update_screen(int type)
|
|||||||
{
|
{
|
||||||
out_flush(); /* required before updating the cursor */
|
out_flush(); /* required before updating the cursor */
|
||||||
if (did_one)
|
if (did_one)
|
||||||
|
{
|
||||||
|
/* Put the GUI position where the cursor was, gui_update_cursor()
|
||||||
|
* uses that. */
|
||||||
|
gui.col = gui_cursor_col;
|
||||||
|
gui.row = gui_cursor_row;
|
||||||
gui_update_cursor(FALSE, FALSE);
|
gui_update_cursor(FALSE, FALSE);
|
||||||
|
}
|
||||||
gui_update_scrollbars(FALSE);
|
gui_update_scrollbars(FALSE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -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 */
|
||||||
|
/**/
|
||||||
|
2003,
|
||||||
/**/
|
/**/
|
||||||
2002,
|
2002,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user