aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2019-06-16 12:34:27 +0200
committerGitHub <noreply@github.com>2019-06-16 12:34:27 +0200
commit3d6e48a941acab51d8c045ec325783c0107a5d54 (patch)
tree50a56b49db6e743f46f63047cbaf9d071c34ba25 /src/nvim/search.c
parent5a96161e8664339c11a904b6f851f44d9c5b49d3 (diff)
parente39d217592d83566bba004dc80120f22f59b544b (diff)
downloadrneovim-3d6e48a941acab51d8c045ec325783c0107a5d54.tar.gz
rneovim-3d6e48a941acab51d8c045ec325783c0107a5d54.tar.bz2
rneovim-3d6e48a941acab51d8c045ec325783c0107a5d54.zip
Merge pull request #10150 from bfredl/extcount
make msg_advance and search_count not crash with ext_messages, fixes #10069
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c5
1 files changed, 4 insertions, 1 deletions
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;
}