diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-06-08 13:42:21 +0200 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2019-06-16 11:07:29 +0200 |
commit | 41f31ca90da4edd3c2fe518b87d4134552429ff8 (patch) | |
tree | 0f18a56d3f8d76b6d983a0bde74d9f060e38cf7e /src | |
parent | 5a96161e8664339c11a904b6f851f44d9c5b49d3 (diff) | |
download | rneovim-41f31ca90da4edd3c2fe518b87d4134552429ff8.tar.gz rneovim-41f31ca90da4edd3c2fe518b87d4134552429ff8.tar.bz2 rneovim-41f31ca90da4edd3c2fe518b87d4134552429ff8.zip |
messages: support shortmess-=S in ext_messages
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/message.c | 5 | ||||
-rw-r--r-- | src/nvim/search.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c index 5188824901..4fafbd5e0a 100644 --- a/src/nvim/message.c +++ b/src/nvim/message.c @@ -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); diff --git a/src/nvim/search.c b/src/nvim/search.c index 3834bf9700..9cbe21bdc8 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -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; } |