Skip to content

Commit 18b5d6d

Browse files
committed
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.
1 parent 7076594 commit 18b5d6d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/channel.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,10 +945,15 @@ invoke_callback(channel_T *channel, char_u *callback, typval_T *argv)
945945
clear_tv(&rettv);
946946

947947
/* If an echo command was used the cursor needs to be put back where
948-
* it belongs. */
948+
* it belongs. If highlighting was changed a redraw is needed. */
949+
update_screen(0);
949950
setcursor();
950951
cursor_on();
951952
out_flush();
953+
#ifdef FEAT_GUI
954+
gui_update_cursor(TRUE, FALSE);
955+
gui_mch_flush();
956+
#endif
952957
}
953958

954959
/*

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,8 @@ static char *(features[]) =
743743

744744
static int included_patches[] =
745745
{ /* Add new patch number below this line */
746+
/**/
747+
1452,
746748
/**/
747749
1451,
748750
/**/

0 commit comments

Comments
 (0)