mirror of
https://github.com/vim/vim.git
synced 2025-11-16 23:24:03 -05:00
patch 9.1.1539: completion: messages don't respect 'shm' setting
Problem: completion: messages don't respect 'shm' setting
Solution: Turn off completion messages when 'shortmess' includes "c"
(Girish Palya).
`:set shortmess+=c` is intended to reduce noise during completion by
suppressing messages.
Previously, some completion messages still appeared regardless of this setting.
This change ensures that **all** completion-related messages are suppressed
when `'c'` is present in `'shortmess'`.
Not entirely sure if the original behavior was intentional. If there's a
reason certain messages were always shown, feel free to close this without
merging.
closes: #17737
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
ce1d1969f3
commit
fe1d3c8af7
@@ -6600,7 +6600,8 @@ ins_compl_start(void)
|
||||
|
||||
if (compl_status_adding())
|
||||
{
|
||||
edit_submode_pre = (char_u *)_(" Adding");
|
||||
if (!shortmess(SHM_COMPLETIONMENU))
|
||||
edit_submode_pre = (char_u *)_(" Adding");
|
||||
if (ctrl_x_mode_line_or_eval())
|
||||
{
|
||||
// Insert a new line, keep indentation but ignore 'comments'.
|
||||
@@ -6627,10 +6628,13 @@ ins_compl_start(void)
|
||||
compl_startpos.col = compl_col;
|
||||
}
|
||||
|
||||
if (compl_cont_status & CONT_LOCAL)
|
||||
edit_submode = (char_u *)_(ctrl_x_msgs[CTRL_X_LOCAL_MSG]);
|
||||
else
|
||||
edit_submode = (char_u *)_(CTRL_X_MSG(ctrl_x_mode));
|
||||
if (!shortmess(SHM_COMPLETIONMENU))
|
||||
{
|
||||
if (compl_cont_status & CONT_LOCAL)
|
||||
edit_submode = (char_u *)_(ctrl_x_msgs[CTRL_X_LOCAL_MSG]);
|
||||
else
|
||||
edit_submode = (char_u *)_(CTRL_X_MSG(ctrl_x_mode));
|
||||
}
|
||||
|
||||
// If any of the original typed text has been changed we need to fix
|
||||
// the redo buffer.
|
||||
@@ -6655,11 +6659,14 @@ ins_compl_start(void)
|
||||
// showmode might reset the internal line pointers, so it must
|
||||
// be called before line = ml_get(), or when this address is no
|
||||
// longer needed. -- Acevedo.
|
||||
edit_submode_extra = (char_u *)_("-- Searching...");
|
||||
edit_submode_highl = HLF_COUNT;
|
||||
showmode();
|
||||
edit_submode_extra = NULL;
|
||||
out_flush();
|
||||
if (!shortmess(SHM_COMPLETIONMENU))
|
||||
{
|
||||
edit_submode_extra = (char_u *)_("-- Searching...");
|
||||
edit_submode_highl = HLF_COUNT;
|
||||
showmode();
|
||||
edit_submode_extra = NULL;
|
||||
out_flush();
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -6821,7 +6828,8 @@ ins_complete(int c, int enable_pum)
|
||||
else
|
||||
compl_cont_status &= ~CONT_S_IPOS;
|
||||
|
||||
ins_compl_show_statusmsg();
|
||||
if (!shortmess(SHM_COMPLETIONMENU))
|
||||
ins_compl_show_statusmsg();
|
||||
|
||||
// Show the popup menu, unless we got interrupted.
|
||||
if (enable_pum && !compl_interrupted)
|
||||
|
||||
Reference in New Issue
Block a user