patch 8.2.0295: highlighting for :s wrong when using different separator

Problem:    Highlighting for :s wrong when using different separator.
Solution:   Use separat argument for search direction and separator. (Rob
            Pilling, closes #5665)
diff --git a/src/search.c b/src/search.c
index 3b310dc..2005b79 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1187,6 +1187,7 @@
 do_search(
     oparg_T	    *oap,	// can be NULL
     int		    dirc,	// '/' or '?'
+    int		    search_delim, // the delimiter for the search, e.g. '%' in s%regex%replacement%
     char_u	    *pat,
     long	    count,
     int		    options,
@@ -1285,7 +1286,7 @@
 	searchstr = pat;
 	dircp = NULL;
 					    // use previous pattern
-	if (pat == NULL || *pat == NUL || *pat == dirc)
+	if (pat == NULL || *pat == NUL || *pat == search_delim)
 	{
 	    if (spats[RE_SEARCH].pat == NULL)	    // no previous pattern
 	    {
@@ -1311,7 +1312,7 @@
 	     * If there is a matching '/' or '?', toss it.
 	     */
 	    ps = strcopy;
-	    p = skip_regexp(pat, dirc, (int)p_magic, &strcopy);
+	    p = skip_regexp(pat, search_delim, (int)p_magic, &strcopy);
 	    if (strcopy != ps)
 	    {
 		// made a copy of "pat" to change "\?" to "?"
@@ -1319,7 +1320,7 @@
 		pat = strcopy;
 		searchstr = strcopy;
 	    }
-	    if (*p == dirc)
+	    if (*p == search_delim)
 	    {
 		dircp = p;	// remember where we put the NUL
 		*p++ = NUL;
@@ -1525,7 +1526,7 @@
 		RE_LAST, sia);
 
 	if (dircp != NULL)
-	    *dircp = dirc;	// restore second '/' or '?' for normal_cmd()
+	    *dircp = search_delim;	// restore second '/' or '?' for normal_cmd()
 
 	if (!shortmess(SHM_SEARCH)
 		&& ((dirc == '/' && LT_POS(pos, curwin->w_cursor))
@@ -1606,6 +1607,7 @@
 	    break;
 
 	dirc = *++pat;
+	search_delim = dirc;
 	if (dirc != '?' && dirc != '/')
 	{
 	    retval = 0;