summaryrefslogtreecommitdiffstats
path: root/src/insexpand.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-12-12 13:32:07 +0100
committerBram Moolenaar <Bram@vim.org>2020-12-12 13:32:07 +0100
commitcc2335896ba707bf0d8cf03cca2de7c66fab62a0 (patch)
tree152b336bb2486e6f299e53b325cade4b99fe1388 /src/insexpand.c
parent0ea7421ae6618fe8efe9e3afc8fdcf7a4d89739a (diff)
patch 8.2.2130: Insert mode completion messages end up in message historyv8.2.2130
Problem: Insert mode completion messages end up in message history. Solution: Set msg_hist_off. (closes #7452
Diffstat (limited to 'src/insexpand.c')
-rw-r--r--src/insexpand.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/insexpand.c b/src/insexpand.c
index eebf01dc47..28017d4366 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -1298,6 +1298,7 @@ ins_compl_files(
fp = mch_fopen((char *)files[i], "r"); // open dictionary file
if (flags != DICT_EXACT)
{
+ msg_hist_off = TRUE; // reset in msg_trunc_attr()
vim_snprintf((char *)IObuff, IOSIZE,
_("Scanning dictionary: %s"), (char *)files[i]);
(void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
@@ -2778,6 +2779,7 @@ ins_compl_get_exp(pos_T *ini)
dict = ins_buf->b_fname;
dict_f = DICT_EXACT;
}
+ msg_hist_off = TRUE; // reset in msg_trunc_attr()
vim_snprintf((char *)IObuff, IOSIZE, _("Scanning: %s"),
ins_buf->b_fname == NULL
? buf_spname(ins_buf)
@@ -2812,6 +2814,7 @@ ins_compl_get_exp(pos_T *ini)
#endif
else if (*e_cpt == ']' || *e_cpt == 't')
{
+ msg_hist_off = TRUE; // reset in msg_trunc_attr()
type = CTRL_X_TAGS;
vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
(void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
@@ -3423,9 +3426,11 @@ ins_compl_next(
MB_PTR_ADV(s);
}
}
+ msg_hist_off = TRUE;
vim_snprintf((char *)IObuff, IOSIZE, "%s %s%s", lead,
s > compl_shown_match->cp_fname ? "<" : "", s);
msg((char *)IObuff);
+ msg_hist_off = FALSE;
redraw_cmdline = FALSE; // don't overwrite!
}
}
@@ -4105,9 +4110,13 @@ ins_complete(int c, int enable_pum)
if (edit_submode_extra != NULL)
{
if (!p_smd)
+ {
+ msg_hist_off = TRUE;
msg_attr((char *)edit_submode_extra,
edit_submode_highl < HLF_COUNT
? HL_ATTR(edit_submode_highl) : 0);
+ msg_hist_off = FALSE;
+ }
}
else
msg_clr_cmdline(); // necessary for "noshowmode"