Skip to content

Instantly share code, notes, and snippets.

@h-east
Created February 5, 2019 07:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save h-east/4d06f3d13ec19cdeaabb0310c6ecdb32 to your computer and use it in GitHub Desktop.
Save h-east/4d06f3d13ec19cdeaabb0310c6ecdb32 to your computer and use it in GitHub Desktop.
diff --git a/src/edit.c b/src/edit.c
index eac480314..52955b2e1 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -4868,6 +4868,7 @@ ins_compl_next(
int found_end = FALSE;
int advance;
int started = compl_started;
+ static int need_firsttime_screen_update = TRUE;
/* When user complete function return -1 for findstart which is next
* time of 'always', compl_shown_match become NULL. */
@@ -5025,6 +5026,12 @@ ins_compl_next(
// inserted.
pum_call_update_screen();
+ if (need_firsttime_screen_update)
+ {
+ update_screen(0);
+ need_firsttime_screen_update = FALSE;
+ }
+
/* display the updated popup menu */
ins_compl_show_pum();
#ifdef FEAT_GUI
@@ -5040,6 +5047,8 @@ ins_compl_next(
* don't want to match ourselves! */
ins_compl_delete();
}
+ else
+ need_firsttime_screen_update = TRUE;
/* Enter will select a match when the match wasn't inserted and the popup
* menu is visible. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment