aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-09-02 15:56:29 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-09-02 18:40:56 -0400
commit07b209b1fec19d4e8d7e5390c664d582d6a3145c (patch)
tree3236faae42a071f619a24137e6be6b56734189d4 /src/nvim/search.c
parent6434a0bf99d1733a295844813db201d533e65883 (diff)
downloadrneovim-07b209b1fec19d4e8d7e5390c664d582d6a3145c.tar.gz
rneovim-07b209b1fec19d4e8d7e5390c664d582d6a3145c.tar.bz2
rneovim-07b209b1fec19d4e8d7e5390c664d582d6a3145c.zip
vim-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 vim/vim#2850) https://github.com/vim/vim/commit/451fc7b954906069f1830a8092ad85616049a828
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 26549208a8..7d1c19d68c 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -100,7 +100,7 @@ static struct spat saved_spats[2];
// searching
static struct spat saved_last_search_spat;
static int saved_last_idx = 0;
-static int saved_no_hlsearch = 0;
+static bool saved_no_hlsearch = false;
static char_u *mr_pattern = NULL; // pattern used by search_regcomp()
static int mr_pattern_alloced = false; // mr_pattern was allocated
@@ -248,7 +248,7 @@ void save_re_pat(int idx, char_u *pat, int magic)
/* 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);
}
}
@@ -281,7 +281,7 @@ void restore_search_patterns(void)
free_spat(&spats[1]);
spats[1] = saved_spats[1];
last_idx = saved_last_idx;
- SET_NO_HLSEARCH(saved_no_hlsearch);
+ set_no_hlsearch(saved_no_hlsearch);
}
}
@@ -330,7 +330,7 @@ void restore_last_search_pattern(void)
spats[RE_SEARCH] = saved_last_search_spat;
set_vv_searchforward();
last_idx = saved_last_idx;
- SET_NO_HLSEARCH(saved_no_hlsearch);
+ set_no_hlsearch(saved_no_hlsearch);
}
char_u *last_search_pattern(void)
@@ -1048,7 +1048,7 @@ int do_search(
*/
if (no_hlsearch && !(options & SEARCH_KEEP)) {
redraw_all_later(SOME_VALID);
- SET_NO_HLSEARCH(FALSE);
+ set_no_hlsearch(false);
}
/*