]> granicus.if.org Git - vim/commitdiff
patch 7.4.1452 v7.4.1452
authorBram Moolenaar <Bram@vim.org>
Sun, 28 Feb 2016 18:30:24 +0000 (19:30 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 28 Feb 2016 18:30:24 +0000 (19:30 +0100)
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.

src/channel.c
src/version.c

index 5e8c6bd8144e36ec5b6926f377ba16f91f14a495..9e406abdb286b3114cc6de07b4fe3f20dfced9aa 100644 (file)
@@ -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
 }
 
 /*
index 86ed2231776f0f692b937b7e959267180f228420..4d3b32422ab1f5fbe404da26915ef4e2edcb5892 100644 (file)
@@ -743,6 +743,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1452,
 /**/
     1451,
 /**/