Mercurial > vim
diff src/edit.c @ 857:b933657f7c9d
updated for version 7.0g01
author | vimboss |
---|---|
date | Tue, 02 May 2006 22:08:30 +0000 |
parents | d10fbefd3bc1 |
children | bc620d6bdf06 |
line wrap: on
line diff
--- a/src/edit.c +++ b/src/edit.c @@ -4695,9 +4695,9 @@ ins_complete(c) 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 @@ ins_complete(c) 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; }