summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-05 20:12:06 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-05 20:12:06 +0100
commit2a78b7c70471527d83adef6b147dbfb6c9f838f7 (patch)
tree1f361c18f8a502f49fa1293ff3577cebcffa80ca
parent71b13e92ae580038b8aecbb783296c577ca2ba5a (diff)
downloadvim-git-2a78b7c70471527d83adef6b147dbfb6c9f838f7.tar.gz
patch 8.1.0876: completion match not displayed when popup menu is not shownv8.1.0876
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)
-rw-r--r--src/edit.c10
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 3 deletions
diff --git a/src/edit.c b/src/edit.c
index eac480314..042826a87 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -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();
diff --git a/src/version.c b/src/version.c
index 9b2e7c9f6..dbf0cabf2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -784,6 +784,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 876,
+/**/
875,
/**/
874,