aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/search.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-11-15 11:44:37 -0500
committerJustin M. Keyes <justinkz@gmail.com>2014-11-15 11:44:37 -0500
commitbc812a82f87644e184b17517936fddf6ff1221e3 (patch)
treeca6faf2bbc85d9098b6663d2d236ca761175cb2f /src/nvim/search.c
parentb299c011a04e6c14ec7dc9fd50a58f4a9e5afd40 (diff)
parent150b0d66e11dc69b1a4fc3daad3016fa74bee4d9 (diff)
downloadrneovim-bc812a82f87644e184b17517936fddf6ff1221e3.tar.gz
rneovim-bc812a82f87644e184b17517936fddf6ff1221e3.tar.bz2
rneovim-bc812a82f87644e184b17517936fddf6ff1221e3.zip
Merge pull request #1460 from elmart/clang-analysis-fixes-3
Fix clang analysis warnings. (3)
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r--src/nvim/search.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c
index 1e275e9753..bd1811c7fb 100644
--- a/src/nvim/search.c
+++ b/src/nvim/search.c
@@ -3973,6 +3973,7 @@ find_pattern_in_path (
char_u *startp = NULL;
char_u *inc_opt = NULL;
win_T *curwin_save = NULL;
+ const int l_g_do_tagpreview = g_do_tagpreview;
regmatch.regprog = NULL;
incl_regmatch.regprog = NULL;
@@ -4370,7 +4371,7 @@ search_line:
} else if (--count <= 0) {
found = TRUE;
if (depth == -1 && lnum == curwin->w_cursor.lnum
- && g_do_tagpreview == 0
+ && l_g_do_tagpreview == 0
)
EMSG(_("E387: Match is on current line"));
else if (action == ACTION_SHOW) {
@@ -4380,7 +4381,7 @@ search_line:
did_show = TRUE;
} else {
/* ":psearch" uses the preview window */
- if (g_do_tagpreview != 0) {
+ if (l_g_do_tagpreview != 0) {
curwin_save = curwin;
prepare_tagpreview(true);
}
@@ -4391,7 +4392,7 @@ search_line:
}
if (depth == -1) {
/* match in current file */
- if (g_do_tagpreview != 0) {
+ if (l_g_do_tagpreview != 0) {
if (getfile(0, curwin_save->w_buffer->b_fname,
NULL, TRUE, lnum, FALSE) > 0)
break; /* failed to jump to file */
@@ -4412,7 +4413,7 @@ search_line:
curwin->w_set_curswant = TRUE;
}
- if (g_do_tagpreview != 0
+ if (l_g_do_tagpreview != 0
&& curwin != curwin_save && win_valid(curwin_save)) {
/* Return cursor to where we were */
validate_cursor();