mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix(messages): no message kind for completion menu messages #31646
This commit is contained in:
@@ -796,6 +796,7 @@ must handle.
|
|||||||
"echo" |:echo| message
|
"echo" |:echo| message
|
||||||
"echomsg" |:echomsg| message
|
"echomsg" |:echomsg| message
|
||||||
"echoerr" |:echoerr| message
|
"echoerr" |:echoerr| message
|
||||||
|
"completion" |ins-completion-menu| message
|
||||||
"list_cmd" List output for various commands (|:ls|, |:set|, …)
|
"list_cmd" List output for various commands (|:ls|, |:set|, …)
|
||||||
"lua_error" Error in |:lua| code
|
"lua_error" Error in |:lua| code
|
||||||
"lua_print" |print()| from |:lua| code
|
"lua_print" |print()| from |:lua| code
|
||||||
|
@@ -1582,6 +1582,7 @@ static void ins_compl_files(int count, char **files, bool thesaurus, int flags,
|
|||||||
FILE *fp = os_fopen(files[i], "r"); // open dictionary file
|
FILE *fp = os_fopen(files[i], "r"); // open dictionary file
|
||||||
if (flags != DICT_EXACT && !shortmess(SHM_COMPLETIONSCAN)) {
|
if (flags != DICT_EXACT && !shortmess(SHM_COMPLETIONSCAN)) {
|
||||||
msg_hist_off = true; // reset in msg_trunc()
|
msg_hist_off = true; // reset in msg_trunc()
|
||||||
|
msg_ext_set_kind("completion");
|
||||||
vim_snprintf(IObuff, IOSIZE,
|
vim_snprintf(IObuff, IOSIZE,
|
||||||
_("Scanning dictionary: %s"), files[i]);
|
_("Scanning dictionary: %s"), files[i]);
|
||||||
msg_trunc(IObuff, true, HLF_R);
|
msg_trunc(IObuff, true, HLF_R);
|
||||||
@@ -3060,6 +3061,7 @@ static int process_next_cpt_value(ins_compl_next_state_T *st, int *compl_type_ar
|
|||||||
}
|
}
|
||||||
if (!shortmess(SHM_COMPLETIONSCAN)) {
|
if (!shortmess(SHM_COMPLETIONSCAN)) {
|
||||||
msg_hist_off = true; // reset in msg_trunc()
|
msg_hist_off = true; // reset in msg_trunc()
|
||||||
|
msg_ext_set_kind("completion");
|
||||||
vim_snprintf(IObuff, IOSIZE, _("Scanning: %s"),
|
vim_snprintf(IObuff, IOSIZE, _("Scanning: %s"),
|
||||||
st->ins_buf->b_fname == NULL
|
st->ins_buf->b_fname == NULL
|
||||||
? buf_spname(st->ins_buf)
|
? buf_spname(st->ins_buf)
|
||||||
@@ -3092,6 +3094,7 @@ static int process_next_cpt_value(ins_compl_next_state_T *st, int *compl_type_ar
|
|||||||
} else if (*st->e_cpt == ']' || *st->e_cpt == 't') {
|
} else if (*st->e_cpt == ']' || *st->e_cpt == 't') {
|
||||||
compl_type = CTRL_X_TAGS;
|
compl_type = CTRL_X_TAGS;
|
||||||
if (!shortmess(SHM_COMPLETIONSCAN)) {
|
if (!shortmess(SHM_COMPLETIONSCAN)) {
|
||||||
|
msg_ext_set_kind("completion");
|
||||||
msg_hist_off = true; // reset in msg_trunc()
|
msg_hist_off = true; // reset in msg_trunc()
|
||||||
vim_snprintf(IObuff, IOSIZE, "%s", _("Scanning tags."));
|
vim_snprintf(IObuff, IOSIZE, "%s", _("Scanning tags."));
|
||||||
msg_trunc(IObuff, true, HLF_R);
|
msg_trunc(IObuff, true, HLF_R);
|
||||||
@@ -4602,6 +4605,7 @@ static void ins_compl_show_statusmsg(void)
|
|||||||
if (edit_submode_extra != NULL) {
|
if (edit_submode_extra != NULL) {
|
||||||
if (!p_smd) {
|
if (!p_smd) {
|
||||||
msg_hist_off = true;
|
msg_hist_off = true;
|
||||||
|
msg_ext_set_kind("completion");
|
||||||
msg(edit_submode_extra, (edit_submode_highl < HLF_COUNT
|
msg(edit_submode_extra, (edit_submode_highl < HLF_COUNT
|
||||||
? (int)edit_submode_highl + 1 : 0));
|
? (int)edit_submode_highl + 1 : 0));
|
||||||
msg_hist_off = false;
|
msg_hist_off = false;
|
||||||
|
@@ -253,6 +253,20 @@ describe('ui/ext_messages', function()
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- kind=completion
|
||||||
|
command('set noshowmode')
|
||||||
|
feed('i<C-n>')
|
||||||
|
screen:expect({
|
||||||
|
messages = {
|
||||||
|
{
|
||||||
|
content = { { 'The only match' } },
|
||||||
|
kind = 'completion',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
feed('<Esc>')
|
||||||
|
command('set showmode')
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it(':echoerr', function()
|
it(':echoerr', function()
|
||||||
|
Reference in New Issue
Block a user