]> granicus.if.org Git - vim/commitdiff
patch 8.1.0876: completion match not displayed when popup menu is not shown v8.1.0876
authorBram Moolenaar <Bram@vim.org>
Tue, 5 Feb 2019 19:12:06 +0000 (20:12 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 5 Feb 2019 19:12:06 +0000 (20:12 +0100)
Problem:    Completion match not displayed when popup menu is not shown.
Solution:   Call update_screen() when not displaying the popup menu to show
            the inserted match. (Ken Takata, Hirohito Higashi)

src/edit.c
src/version.c

index eac480314761df8a389fb9dbff557fc20966f0d3..042826a872e4c770619ae9b94d0cb048fac3cd07 100644 (file)
@@ -5021,9 +5021,13 @@ ins_compl_next(
        /* may undisplay the popup menu first */
        ins_compl_upd_pum();
 
-       // Redraw before showing the popup menu to show the user what was
-       // inserted.
-       pum_call_update_screen();
+       if (pum_enough_matches())
+           // Will display the popup menu, don't redraw yet to avoid flicker.
+           pum_call_update_screen();
+       else
+           // Not showing the popup menu yet, redraw to show the user what was
+           // inserted.
+           update_screen(0);
 
        /* display the updated popup menu */
        ins_compl_show_pum();
index 9b2e7c9f6d6f9271b0feefbe2012427609e7604e..dbf0cabf25b1769195de7686ca4a9c273441028c 100644 (file)
@@ -783,6 +783,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    876,
 /**/
     875,
 /**/