1
0
forked from aniani/vim

patch 7.4.1578

Problem:    There is no way to invoke a function later or periodically.
Solution:   Add timer support.
This commit is contained in:
Bram Moolenaar
2016-03-15 23:10:59 +01:00
parent ab1fa3955f
commit 975b5271ee
14 changed files with 438 additions and 18 deletions

View File

@@ -410,6 +410,27 @@ redraw_asap(int type)
return ret;
}
/*
* 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.
*/
void
redraw_after_callback()
{
update_screen(0);
setcursor();
cursor_on();
out_flush();
#ifdef FEAT_GUI
if (gui.in_use)
{
gui_update_cursor(TRUE, FALSE);
gui_mch_flush();
}
#endif
}
/*
* Changed something in the current window, at buffer line "lnum", that
* requires that line and possibly other lines to be redrawn.