summaryrefslogtreecommitdiffstats
path: root/src/insexpand.c
diff options
context:
space:
mode:
author=?UTF-8?q?Bj=C3=B6rn=20Linse?= <bjorn.linse@gmail.com>2022-10-13 12:51:13 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-13 12:51:13 +0100
commit91ccbad5ded8bcf2cc93a873ff2c3179b0c548c7 (patch)
tree4a05f5002f9a6ecabb98dd90d014427eda955420 /src/insexpand.c
parentd26c5805bcbd630dab0478c2d22503a6e32a83c1 (diff)
patch 9.0.0738: cannot suppress completion "scanning" messagesv9.0.0738
Problem: Cannot suppress completion "scanning" messages. Solution: Add the "C" flag in 'shortmess'. (Bjorn Linse, closes #11354)
Diffstat (limited to 'src/insexpand.c')
-rw-r--r--src/insexpand.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/insexpand.c b/src/insexpand.c
index 8f8157e01f..36a8ab1fd2 100644
--- a/src/insexpand.c
+++ b/src/insexpand.c
@@ -1573,7 +1573,7 @@ ins_compl_files(
for (i = 0; i < count && !got_int && !compl_interrupted; i++)
{
fp = mch_fopen((char *)files[i], "r"); // open dictionary file
- if (flags != DICT_EXACT)
+ if (flags != DICT_EXACT && !shortmess(SHM_COMPLETIONSCAN))
{
msg_hist_off = TRUE; // reset in msg_trunc_attr()
vim_snprintf((char *)IObuff, IOSIZE,
@@ -3281,14 +3281,17 @@ process_next_cpt_value(
st->dict = st->ins_buf->b_fname;
st->dict_f = DICT_EXACT;
}
- msg_hist_off = TRUE; // reset in msg_trunc_attr()
- vim_snprintf((char *)IObuff, IOSIZE, _("Scanning: %s"),
- st->ins_buf->b_fname == NULL
- ? buf_spname(st->ins_buf)
- : st->ins_buf->b_sfname == NULL
- ? st->ins_buf->b_fname
- : st->ins_buf->b_sfname);
- (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+ if (!shortmess(SHM_COMPLETIONSCAN))
+ {
+ msg_hist_off = TRUE; // reset in msg_trunc_attr()
+ vim_snprintf((char *)IObuff, IOSIZE, _("Scanning: %s"),
+ st->ins_buf->b_fname == NULL
+ ? buf_spname(st->ins_buf)
+ : st->ins_buf->b_sfname == NULL
+ ? st->ins_buf->b_fname
+ : st->ins_buf->b_sfname);
+ (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+ }
}
else if (*st->e_cpt == NUL)
status = INS_COMPL_CPT_END;
@@ -3316,10 +3319,13 @@ process_next_cpt_value(
#endif
else if (*st->e_cpt == ']' || *st->e_cpt == 't')
{
- msg_hist_off = TRUE; // reset in msg_trunc_attr()
compl_type = CTRL_X_TAGS;
- vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
- (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+ if (!shortmess(SHM_COMPLETIONSCAN))
+ {
+ msg_hist_off = TRUE; // reset in msg_trunc_attr()
+ vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
+ (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
+ }
}
else
compl_type = -1;