summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-15 23:10:59 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-15 23:10:59 +0100
commit975b5271eed4fa0500c24a8f37be0b1797cb9db7 (patch)
treee2f73f9ae91f1fce55de8757dc1599fcc169c3fe /src/screen.c
parentab1fa3955f25dfdb7e329c3bd76e175c93c8cb5e (diff)
downloadvim-git-975b5271eed4fa0500c24a8f37be0b1797cb9db7.tar.gz
patch 7.4.1578v7.4.1578
Problem: There is no way to invoke a function later or periodically. Solution: Add timer support.
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c
index b293869cb..c1eb1c459 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -411,6 +411,27 @@ 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.
+ */
+ 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.
* Used when entering/leaving Insert mode with the cursor on a folded line.