changeset 8320:e2021d6feeda v7.4.1452

commit https://github.com/vim/vim/commit/18b5d6df10a5f08ffebbec85a1cf2828871e3736 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 28 19:30:24 2016 +0100 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.
author Christian Brabandt <cb@256bit.org>
date Sun, 28 Feb 2016 19:45:04 +0100
parents 84a0b8e6bce6
children ca5af778f5f0
files src/channel.c src/version.c
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -945,10 +945,15 @@ invoke_callback(channel_T *channel, char
     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
 }
 
 /*
--- a/src/version.c
+++ b/src/version.c
@@ -744,6 +744,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1452,
+/**/
     1451,
 /**/
     1450,