aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-29 19:45:32 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-09-29 21:36:00 -0400
commit83ebe0c9988bd4abeda0f7ca0775d50e050b9e55 (patch)
tree8dba16a238f44ebec66af02fd15b92d0fc796b2c /src/nvim/search.c
parenta307489a79450a0f54282f11203ae68577505ab4 (diff)
downloadrneovim-83ebe0c9988bd4abeda0f7ca0775d50e050b9e55.tar.gz
rneovim-83ebe0c9988bd4abeda0f7ca0775d50e050b9e55.tar.bz2
rneovim-83ebe0c9988bd4abeda0f7ca0775d50e050b9e55.zip
vim-patch:8.1.1992: the search stat moves when wrapping at the end of the buffer
Problem: The search stat moves when wrapping at the end of the buffer. Solution: Put the "W" in front instead of at the end. https://github.com/vim/vim/commit/16b58ae9f36e9675c34d942f5d5f8c8a7914dbc4
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index d379415d62..a3acf0c27d 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -4359,7 +4359,9 @@ static void search_stat(int dirc, pos_T *pos,
len = STRLEN(t);
if (show_top_bot_msg && len + 2 < SEARCH_STAT_BUF_LEN) {
- STRCPY(t + len, " W");
+ memmove(t + 2, t, len);
+ t[0] = 'W';
+ t[1] = ' ';
len += 2;
}