messages: support shortmess-=S in ext_messages

This commit is contained in:
Björn Linse
2019-06-08 13:42:21 +02:00
parent 5a96161e86
commit 41f31ca90d
4 changed files with 38 additions and 2 deletions

View File

@@ -3018,7 +3018,10 @@ void give_warning(char_u *message, bool hl) FUNC_ATTR_NONNULL_ARG(1)
} else {
keep_msg_attr = 0;
}
msg_ext_set_kind("wmsg");
if (msg_ext_kind == NULL) {
msg_ext_set_kind("wmsg");
}
if (msg_attr((const char *)message, keep_msg_attr) && msg_scrolled == 0) {
set_keep_msg(message, keep_msg_attr);

View File

@@ -1168,7 +1168,9 @@ int do_search(
// search stat. Use all the space available, so that the
// search state is right aligned. If there is not enough space
// msg_strtrunc() will shorten in the middle.
if (msg_scrolled != 0) {
if (ui_has(kUIMessages)) {
len = 0; // adjusted below
} else if (msg_scrolled != 0) {
// Use all the columns.
len = (int)(Rows - msg_row) * Columns - 1;
} else {
@@ -4328,6 +4330,7 @@ static void search_stat(int dirc, pos_T *pos,
// keep the message even after redraw, but don't put in history
msg_hist_off = true;
msg_ext_set_kind("search_count");
give_warning(msgbuf, false);
msg_hist_off = false;
}