patch 8.1.1350: "W" for wrapping not shown when more than 99 matches

Problem:    "W" for wrapping not shown when more than 99 matches.
Solution:   Adjust check for length. (Masato Nishihata, closes #4388)
diff --git a/src/search.c b/src/search.c
index d9b6a7c..56bd763 100644
--- a/src/search.c
+++ b/src/search.c
@@ -5012,7 +5012,7 @@
 	}
 
 	len = STRLEN(t);
-	if (show_top_bot_msg && len + 3 < SEARCH_STAT_BUF_LEN)
+	if (show_top_bot_msg && len + 2 < SEARCH_STAT_BUF_LEN)
 	{
 	    STRCPY(t + len, " W");
 	    len += 2;
diff --git a/src/testdir/test_search_stat.vim b/src/testdir/test_search_stat.vim
index 107cd54..322d137 100644
--- a/src/testdir/test_search_stat.vim
+++ b/src/testdir/test_search_stat.vim
@@ -40,12 +40,20 @@
   let g:a = execute(':unsilent :norm! n')
   let stat = '\[>99/>99\]'
   call assert_match(pat .. stat, g:a)
+  call cursor(line('$'), 1)
+  let g:a = execute(':unsilent :norm! n')
+  let stat = '\[1/>99\] W'
+  call assert_match(pat .. stat, g:a)
 
   " 5) Many matches
   call cursor(1, 1)
   let g:a = execute(':unsilent :norm! n')
   let stat = '\[2/>99\]'
   call assert_match(pat .. stat, g:a)
+  call cursor(1, 1)
+  let g:a = execute(':unsilent :norm! N')
+  let stat = '\[>99/>99\] W'
+  call assert_match(pat .. stat, g:a)
 
   " 6) right-left
   if exists("+rightleft")
diff --git a/src/version.c b/src/version.c
index efddd3e..ac07931 100644
--- a/src/version.c
+++ b/src/version.c
@@ -768,6 +768,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1350,
+/**/
     1349,
 /**/
     1348,