diff src/search.c @ 13792:0e9b2971d7c3 v8.0.1768

patch 8.0.1768: SET_NO_HLSEARCH() used in a wrong way commit https://github.com/vim/vim/commit/451fc7b954906069f1830a8092ad85616049a828 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Apr 27 22:53:07 2018 +0200 patch 8.0.1768: SET_NO_HLSEARCH() used in a wrong way Problem: SET_NO_HLSEARCH() used in a wrong way. Solution: Make it a function. (suggested by Dominique Pelle, closes #2850)
author Christian Brabandt <cb@256bit.org>
date Fri, 27 Apr 2018 23:00:07 +0200
parents 9de2b25932eb
children 96933f0ecbd1
line wrap: on
line diff
--- a/src/search.c
+++ b/src/search.c
@@ -293,7 +293,7 @@ save_re_pat(int idx, char_u *pat, int ma
 	/* If 'hlsearch' set and search pat changed: need redraw. */
 	if (p_hls)
 	    redraw_all_later(SOME_VALID);
-	SET_NO_HLSEARCH(FALSE);
+	set_no_hlsearch(FALSE);
 #endif
     }
 }
@@ -336,7 +336,7 @@ restore_search_patterns(void)
 	spats[1] = saved_spats[1];
 #ifdef FEAT_SEARCH_EXTRA
 	last_idx = saved_last_idx;
-	SET_NO_HLSEARCH(saved_no_hlsearch);
+	set_no_hlsearch(saved_no_hlsearch);
 #endif
     }
 }
@@ -387,7 +387,7 @@ restore_last_search_pattern(void)
     set_vv_searchforward();
 # endif
     last_idx = saved_last_idx;
-    SET_NO_HLSEARCH(saved_no_hlsearch);
+    set_no_hlsearch(saved_no_hlsearch);
 }
 
     char_u *
@@ -1282,7 +1282,7 @@ do_search(
     if (no_hlsearch && !(options & SEARCH_KEEP))
     {
 	redraw_all_later(SOME_VALID);
-	SET_NO_HLSEARCH(FALSE);
+	set_no_hlsearch(FALSE);
     }
 #endif
 
@@ -5757,9 +5757,7 @@ read_viminfo_search_pattern(vir_T *virp,
 		spats[idx].off.off = off;
 #ifdef FEAT_SEARCH_EXTRA
 		if (setlast)
-		{
-		    SET_NO_HLSEARCH(!hlsearch_on);
-		}
+		    set_no_hlsearch(!hlsearch_on);
 #endif
 	    }
 	}