refactor(options): rename empty_option to empty_string_option

This commit is contained in:
Famiu Haque
2023-10-13 20:16:15 +06:00
parent 526234cf56
commit af010e23f3
11 changed files with 79 additions and 79 deletions

View File

@@ -2237,7 +2237,7 @@ int pattern_match(const char *pat, const char *text, bool ic)
// avoid 'l' flag in 'cpoptions'
char *save_cpo = p_cpo;
p_cpo = empty_option;
p_cpo = empty_string_option;
regmatch.regprog = vim_regcomp(pat, RE_MAGIC + RE_STRING);
if (regmatch.regprog != NULL) {
regmatch.rm_ic = ic;
@@ -8645,7 +8645,7 @@ char *do_string_sub(char *str, char *pat, char *sub, typval_T *expr, const char
// Make 'cpoptions' empty, so that the 'l' flag doesn't work here
char *save_cpo = p_cpo;
p_cpo = empty_option;
p_cpo = empty_string_option;
ga_init(&ga, 1, 200);
@@ -8710,7 +8710,7 @@ char *do_string_sub(char *str, char *pat, char *sub, typval_T *expr, const char
char *ret = xstrdup(ga.ga_data == NULL ? str : ga.ga_data);
ga_clear(&ga);
if (p_cpo == empty_option) {
if (p_cpo == empty_string_option) {
p_cpo = save_cpo;
} else {
// Darn, evaluating {sub} expression or {expr} changed the value.