feat(messages): confirm kind for z=, :tselect, inputlist() #32521

Problem:  Messages preceding a `cmdline_show->prompt` event can not be
          distinguished as such when receiving the event. (But since
          `msg_show` handlers should be scheduled, one can already check
          whether a prompt is active when displaying the message.)

Solution: Rather than add a new kind again, use the `confirm` kind.
          Could be seen as slightly misleading where it is more of
          a choice rather than a confirmation, but that already applies
          to `confirm()` as well...
This commit is contained in:
luukvbaal
2025-02-20 23:04:27 +01:00
committed by GitHub
parent 51cf84daf9
commit e16bec41b6
5 changed files with 52 additions and 7 deletions

View File

@@ -3556,7 +3556,7 @@ static void f_inputlist(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
return;
}
msg_ext_set_kind("list_cmd");
msg_ext_set_kind("confirm");
msg_start();
msg_row = Rows - 1; // for when 'cmdheight' > 1
lines_left = Rows; // avoid more prompt

View File

@@ -516,7 +516,7 @@ void spell_suggest(int count)
spell_find_suggest(line + curwin->w_cursor.col, badlen, &sug, limit,
true, need_cap, true);
msg_ext_set_kind("list_cmd");
msg_ext_set_kind("confirm");
if (GA_EMPTY(&sug.su_ga)) {
msg(_("Sorry, no suggestions"), 0);
} else if (count > 0) {

View File

@@ -813,6 +813,7 @@ static void print_tag_list(bool new_tag, bool use_tagstack, int num_matches, cha
if (msg_col == 0) {
msg_didout = false; // overwrite previous message
}
msg_ext_set_kind("confirm");
msg_start();
msg_puts_hl(_(" # pri kind tag"), HLF_T, false);
msg_clr_eos();