/* Make 'cpoptions' empty, the 'l' flag should not be used here. */
save_cpo = p_cpo;
- p_cpo = (char_u *)"";
+ p_cpo = empty_option;
#ifdef FEAT_RELTIME
/* Set the time limit, if there is one. */
theend:
vim_free(pat2);
vim_free(pat3);
- p_cpo = save_cpo;
+ if (p_cpo == empty_option)
+ p_cpo = save_cpo;
+ else
+ /* Darn, evaluating the {skip} expression changed the value. */
+ free_string_option(save_cpo);
return retval;
}
/* Make 'cpoptions' empty, so that the 'l' flag doesn't work here */
save_cpo = p_cpo;
- p_cpo = (char_u *)"";
+ p_cpo = empty_option;
ga_init2(&ga, 1, 200);
ret = vim_strsave(ga.ga_data == NULL ? str : (char_u *)ga.ga_data);
ga_clear(&ga);
- p_cpo = save_cpo;
+ if (p_cpo == empty_option)
+ p_cpo = save_cpo;
+ else
+ /* Darn, evaluating {sub} expression changed the value. */
+ free_string_option(save_cpo);
return ret;
}
/* Make 'cpoptions' empty, the 'l' flag should not be used here. */
save_cpo = p_cpo;
- p_cpo = (char_u *)"";
+ p_cpo = empty_option;
#ifdef FEAT_MULTI_LANG
/* Check for a specified language */
qi->qf_lists[qi->qf_curlist].qf_index = 1;
}
- p_cpo = save_cpo;
+ if (p_cpo == empty_option)
+ p_cpo = save_cpo;
+ else
+ /* Darn, some plugin changed the value. */
+ free_string_option(save_cpo);
#ifdef FEAT_WINDOWS
qf_update_buffer(qi);