summaryrefslogtreecommitdiffstats
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-04-27 22:53:07 +0200
committerBram Moolenaar <Bram@vim.org>2018-04-27 22:53:07 +0200
commit451fc7b954906069f1830a8092ad85616049a828 (patch)
tree5d39c1b58d958de9a81c08805b3c0673415d22c8 /src/ex_docmd.c
parent9d34d90210ba52ebaf45973282e5921f5af364c7 (diff)
patch 8.0.1768: SET_NO_HLSEARCH() used in a wrong wayv8.0.1768
Problem: SET_NO_HLSEARCH() used in a wrong way. Solution: Make it a function. (suggested by Dominique Pelle, closes #2850)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 046ef3cf5d..29270ad488 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -12193,14 +12193,23 @@ ex_set(exarg_T *eap)
(void)do_set(eap->arg, flags);
}
-#ifdef FEAT_SEARCH_EXTRA
+#if defined(FEAT_SEARCH_EXTRA) || defined(PROTO)
+ void
+set_no_hlsearch(int flag)
+{
+ no_hlsearch = flag;
+# ifdef FEAT_EVAL
+ set_vim_var_nr(VV_HLSEARCH, !no_hlsearch && p_hls);
+# endif
+}
+
/*
* ":nohlsearch"
*/
static void
ex_nohlsearch(exarg_T *eap UNUSED)
{
- SET_NO_HLSEARCH(TRUE);
+ set_no_hlsearch(TRUE);
redraw_all_later(SOME_VALID);
}