1
0
forked from aniani/vim

patch 8.0.1002: unnecessarily updating screen after timer callback

Problem:    Unnecessarily updating screen after timer callback.
Solution:   Check if calling the timer sets must_redraw.
This commit is contained in:
Bram Moolenaar
2017-08-26 23:43:28 +02:00
parent 0903d56f5c
commit 02e177d3e8
6 changed files with 21 additions and 10 deletions

View File

@@ -445,9 +445,11 @@ redraw_asap(int type)
* Invoked after an asynchronous callback is called.
* If an echo command was used the cursor needs to be put back where
* it belongs. If highlighting was changed a redraw is needed.
* If "call_update_screen" is FALSE don't call update_screen() when at the
* command line.
*/
void
redraw_after_callback(void)
redraw_after_callback(int call_update_screen)
{
++redrawing_for_callback;
@@ -461,7 +463,7 @@ redraw_after_callback(void)
#ifdef FEAT_WILDMENU
&& wild_menu_showing == 0
#endif
)
&& call_update_screen)
update_screen(0);
/* Redraw in the same position, so that the user can continue
* editing the command. */
@@ -3013,7 +3015,7 @@ win_line(
int startrow,
int endrow,
int nochange UNUSED, /* not updating for changed text */
proftime_T *syntax_tm)
proftime_T *syntax_tm UNUSED)
{
int col = 0; /* visual column on screen */
unsigned off; /* offset in ScreenLines/ScreenAttrs */