summaryrefslogtreecommitdiff
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-28 19:30:24 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-28 19:30:24 +0100
commit18b5d6df10a5f08ffebbec85a1cf2828871e3736 (patch)
treeca68ac66820df973b430ee95232b06b0824a3ea1 /src/channel.c
parent707659490d35e8d66e8bbdcfd93b12dc1387d86c (diff)
downloadvim-18b5d6df10a5f08ffebbec85a1cf2828871e3736.zip
patch 7.4.1452
Problem: When a callback adds a syntax item either the redraw doesn't happen right away or in the GUI the cursor is in the wrong position for a moment. (Jakson Alves de Aquino) Solution: Redraw after the callback was invoked.
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/channel.c b/src/channel.c
index 5e8c6bd81..9e406abdb 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -945,10 +945,15 @@ invoke_callback(channel_T *channel, char_u *callback, typval_T *argv)
clear_tv(&rettv);
/* If an echo command was used the cursor needs to be put back where
- * it belongs. */
+ * it belongs. If highlighting was changed a redraw is needed. */
+ update_screen(0);
setcursor();
cursor_on();
out_flush();
+#ifdef FEAT_GUI
+ gui_update_cursor(TRUE, FALSE);
+ gui_mch_flush();
+#endif
}
/*