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.
Files: src/screen.c
*** ../vim-7.4.2002/src/screen.c 2016-07-07 16:42:57.318788362 +0200
--- src/screen.c 2016-07-08 21:17:43.316001662 +0200
***************
*** 422,428 ****
; /* do nothing */
else if (State & CMDLINE)
redrawcmdline();
! else if ((State & NORMAL) || (State & INSERT))
{
update_screen(0);
setcursor();
--- 422,428 ----
; /* do nothing */
else if (State & CMDLINE)
redrawcmdline();
! else if (State & (NORMAL | INSERT))
{
update_screen(0);
setcursor();
***************
*** 486,493 ****
}
/*
- * update_screen()
- *
* Based on the current value of curwin->w_topline, transfer a screenfull
* of stuff from Filemem to ScreenLines[], and update curwin->w_botline.
*/
--- 486,491 ----
***************
*** 499,504 ****
--- 497,506 ----
#if defined(FEAT_SEARCH_EXTRA) || defined(FEAT_CLIPBOARD)
int did_one;
#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. */
if (!screen_valid(TRUE))
***************
*** 696,702 ****
--- 698,708 ----
* scrolling may make it difficult to redraw the text under
* it. */
if (gui.in_use)
+ {
+ gui_cursor_col = gui.cursor_col;
+ gui_cursor_row = gui.cursor_row;
gui_undraw_cursor();
+ }
#endif
}
#endif
***************
*** 752,758 ****
--- 758,770 ----
{
out_flush(); /* required before updating the cursor */
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_scrollbars(FALSE);
}
#endif
*** ../vim-7.4.2002/src/version.c 2016-07-08 20:11:02.406985104 +0200
--- src/version.c 2016-07-08 21:19:56.370022944 +0200
***************
*** 760,761 ****
--- 760,763 ----
{ /* Add new patch number below this line */
+ /**/
+ 2003,
/**/
--
hundred-and-one symptoms of being an internet addict:
241. You try to look for Net Search even when you're in File Manager.
/// Bram Moolenaar -- Br...@Moolenaar.net --
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 ///