/* copy of spats[], for keeping the search patterns while executing autocmds */
static struct spat saved_spats[2];
# ifdef FEAT_SEARCH_EXTRA
-/* copy of spats[RE_SEARCH], for keeping the search patterns while incremental
- * searching */
-static struct spat saved_last_search_spat;
-static int did_save_last_search_spat = 0;
-static int saved_last_idx = 0;
-static int saved_no_hlsearch = 0;
+static int saved_spats_last_idx = 0;
+static int saved_spats_no_hlsearch = 0;
# endif
static char_u *mr_pattern = NULL; /* pattern used by search_regcomp() */
if (spats[1].pat != NULL)
saved_spats[1].pat = vim_strsave(spats[1].pat);
#ifdef FEAT_SEARCH_EXTRA
- saved_last_idx = last_idx;
- saved_no_hlsearch = no_hlsearch;
+ saved_spats_last_idx = last_idx;
+ saved_spats_no_hlsearch = no_hlsearch;
#endif
}
}
vim_free(spats[1].pat);
spats[1] = saved_spats[1];
#ifdef FEAT_SEARCH_EXTRA
- last_idx = saved_last_idx;
- set_no_hlsearch(saved_no_hlsearch);
+ last_idx = saved_spats_last_idx;
+ set_no_hlsearch(saved_spats_no_hlsearch);
#endif
}
}
#endif
#ifdef FEAT_SEARCH_EXTRA
+// copy of spats[RE_SEARCH], for keeping the search patterns while incremental
+// searching
+static struct spat saved_last_search_spat;
+static int did_save_last_search_spat = 0;
+static int saved_last_idx = 0;
+static int saved_no_hlsearch = 0;
+
/*
* Save and restore the search pattern for incremental highlight search
* feature.
saved_spats[idx].pat = NULL;
else
saved_spats[idx].pat = vim_strsave(spats[idx].pat);
- saved_last_idx = last_idx;
+ saved_spats_last_idx = last_idx;
}
# ifdef FEAT_SEARCH_EXTRA
/* If 'hlsearch' set and search pat changed: need redraw. */