updated for version 7.0g01
diff --git a/src/edit.c b/src/edit.c
index 90b3b69..1cf2808 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -4695,9 +4695,9 @@
compl_matches = n;
compl_curr_match = compl_shown_match;
compl_direction = compl_shows_dir;
- compl_interrupted = FALSE;
- /* eat the ESC to avoid leaving insert mode */
+ /* Eat the ESC that vgetc() returns after a CTRL-C to avoid leaving Insert
+ * mode. */
if (got_int && !global_busy)
{
(void)vgetc();
@@ -4831,12 +4831,17 @@
else
msg_clr_cmdline(); /* necessary for "noshowmode" */
- /* RedrawingDisabled may be set when invoked through complete(). */
- n = RedrawingDisabled;
- RedrawingDisabled = 0;
- ins_compl_show_pum();
- setcursor();
- RedrawingDisabled = n;
+ /* Show the popup menu, unless we got interrupted. */
+ if (!compl_interrupted)
+ {
+ /* RedrawingDisabled may be set when invoked through complete(). */
+ n = RedrawingDisabled;
+ RedrawingDisabled = 0;
+ ins_compl_show_pum();
+ setcursor();
+ RedrawingDisabled = n;
+ }
+ compl_interrupted = FALSE;
return OK;
}