diff src/search.c @ 17992:a9c54c20295c v8.1.1992

patch 8.1.1992: the search stat moves when wrapping at the end of the buffer Commit: https://github.com/vim/vim/commit/16b58ae9f36e9675c34d942f5d5f8c8a7914dbc4 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 6 20:40:21 2019 +0200 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.
author Bram Moolenaar <Bram@vim.org>
date Fri, 06 Sep 2019 20:45:04 +0200
parents c77a41ea0365
children 1868ec23360e
line wrap: on
line diff
--- a/src/search.c
+++ b/src/search.c
@@ -5011,7 +5011,9 @@ search_stat(
 	len = STRLEN(t);
 	if (show_top_bot_msg && len + 2 < SEARCH_STAT_BUF_LEN)
 	{
-	    STRCPY(t + len, " W");
+	    mch_memmove(t + 2, t, len);
+	    t[0] = 'W';
+	    t[1] = ' ';
 	    len += 2;
 	}