1
0
forked from aniani/vim

patch 9.0.0738: cannot suppress completion "scanning" messages

Problem:    Cannot suppress completion "scanning" messages.
Solution:   Add the "C" flag in 'shortmess'. (Bjorn Linse, closes #11354)
This commit is contained in:
=?UTF-8?q?Bj=C3=B6rn=20Linse?=
2022-10-13 12:51:13 +01:00
committed by Bram Moolenaar
parent d26c5805bc
commit 91ccbad5de
4 changed files with 24 additions and 13 deletions

View File

@@ -7079,6 +7079,8 @@ A jump table for the options with a short description can be found at |Q_op|.
c don't give |ins-completion-menu| messages. For example, c don't give |ins-completion-menu| messages. For example,
"-- XXX completion (YYY)", "match 1 of 2", "The only match", "-- XXX completion (YYY)", "match 1 of 2", "The only match",
"Pattern not found", "Back at original", etc. "Pattern not found", "Back at original", etc.
C don't give messages while scanning for ins-completion items,
for instance "scanning tags"
q use "recording" instead of "recording @a" q use "recording" instead of "recording @a"
F don't give the file info when editing a file, like `:silent` F don't give the file info when editing a file, like `:silent`
was used for the command; note that this also affects messages was used for the command; note that this also affects messages

View File

@@ -1573,7 +1573,7 @@ ins_compl_files(
for (i = 0; i < count && !got_int && !compl_interrupted; i++) for (i = 0; i < count && !got_int && !compl_interrupted; i++)
{ {
fp = mch_fopen((char *)files[i], "r"); // open dictionary file 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() msg_hist_off = TRUE; // reset in msg_trunc_attr()
vim_snprintf((char *)IObuff, IOSIZE, vim_snprintf((char *)IObuff, IOSIZE,
@@ -3281,6 +3281,8 @@ process_next_cpt_value(
st->dict = st->ins_buf->b_fname; st->dict = st->ins_buf->b_fname;
st->dict_f = DICT_EXACT; st->dict_f = DICT_EXACT;
} }
if (!shortmess(SHM_COMPLETIONSCAN))
{
msg_hist_off = TRUE; // reset in msg_trunc_attr() msg_hist_off = TRUE; // reset in msg_trunc_attr()
vim_snprintf((char *)IObuff, IOSIZE, _("Scanning: %s"), vim_snprintf((char *)IObuff, IOSIZE, _("Scanning: %s"),
st->ins_buf->b_fname == NULL st->ins_buf->b_fname == NULL
@@ -3290,6 +3292,7 @@ process_next_cpt_value(
: st->ins_buf->b_sfname); : st->ins_buf->b_sfname);
(void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R)); (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
} }
}
else if (*st->e_cpt == NUL) else if (*st->e_cpt == NUL)
status = INS_COMPL_CPT_END; status = INS_COMPL_CPT_END;
else else
@@ -3316,11 +3319,14 @@ process_next_cpt_value(
#endif #endif
else if (*st->e_cpt == ']' || *st->e_cpt == 't') else if (*st->e_cpt == ']' || *st->e_cpt == 't')
{ {
msg_hist_off = TRUE; // reset in msg_trunc_attr()
compl_type = CTRL_X_TAGS; compl_type = CTRL_X_TAGS;
if (!shortmess(SHM_COMPLETIONSCAN))
{
msg_hist_off = TRUE; // reset in msg_trunc_attr()
vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags.")); vim_snprintf((char *)IObuff, IOSIZE, _("Scanning tags."));
(void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R)); (void)msg_trunc_attr((char *)IObuff, TRUE, HL_ATTR(HLF_R));
} }
}
else else
compl_type = -1; compl_type = -1;

View File

@@ -265,11 +265,12 @@ typedef enum {
#define SHM_ATTENTION 'A' // no ATTENTION messages #define SHM_ATTENTION 'A' // no ATTENTION messages
#define SHM_INTRO 'I' // intro messages #define SHM_INTRO 'I' // intro messages
#define SHM_COMPLETIONMENU 'c' // completion menu messages #define SHM_COMPLETIONMENU 'c' // completion menu messages
#define SHM_COMPLETIONSCAN 'C' // completion scanning messages
#define SHM_RECORDING 'q' // short recording message #define SHM_RECORDING 'q' // short recording message
#define SHM_FILEINFO 'F' // no file info messages #define SHM_FILEINFO 'F' // no file info messages
#define SHM_SEARCHCOUNT 'S' // search stats: '[1/10]' #define SHM_SEARCHCOUNT 'S' // search stats: '[1/10]'
#define SHM_POSIX "AS" // POSIX value #define SHM_POSIX "AS" // POSIX value
#define SHM_ALL "rmfixlnwaWtToOsAIcqFS" // all possible flags for 'shm' #define SHM_ALL "rmfixlnwaWtToOsAIcCqFS" // all possible flags for 'shm'
// characters for p_go: // characters for p_go:
#define GO_TERMINAL '!' // use terminal for system commands #define GO_TERMINAL '!' // use terminal for system commands

View File

@@ -699,6 +699,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
738,
/**/ /**/
737, 737,
/**/ /**/