aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tag.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/tag.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/tag.c')
-rw-r--r--src/nvim/tag.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c
index 88676abc2e..beee3c7594 100644
--- a/src/nvim/tag.c
+++ b/src/nvim/tag.c
@@ -2310,7 +2310,6 @@ static int jumpto_tag(
int retval = FAIL;
int getfile_result = GETFILE_UNUSED;
int search_options;
- int save_no_hlsearch;
win_T *curwin_save = NULL;
char_u *full_fname = NULL;
const bool old_KeyTyped = KeyTyped; // getting the file may reset it
@@ -2453,9 +2452,9 @@ static int jumpto_tag(
secure = 1;
++sandbox;
save_magic = p_magic;
- p_magic = FALSE; /* always execute with 'nomagic' */
- /* Save value of no_hlsearch, jumping to a tag is not a real search */
- save_no_hlsearch = no_hlsearch;
+ p_magic = false; // always execute with 'nomagic'
+ // Save value of no_hlsearch, jumping to a tag is not a real search
+ const bool save_no_hlsearch = no_hlsearch;
/*
* If 'cpoptions' contains 't', store the search pattern for the "n"
@@ -2560,7 +2559,7 @@ static int jumpto_tag(
--sandbox;
/* restore no_hlsearch when keeping the old search pattern */
if (search_options) {
- SET_NO_HLSEARCH(save_no_hlsearch);
+ set_no_hlsearch(save_no_hlsearch);
}
// Return OK if jumped to another file (at least we found the file!).