Incsubsitution feature

Originally implemented by

* Clement0
* DesbyP
* aym7
* Adrey06
* Robinhola

in #4811. Major reworkings and bug
fixes by

* bfredl

Most tests suggested by ZyX-l, suggestions for improvements by oni-link.
This commit is contained in:
KillTheMule
2016-08-12 12:00:36 +02:00
parent 6143cfdeec
commit 13841a56b4
23 changed files with 486 additions and 59 deletions

View File

@@ -288,6 +288,7 @@ static char *(p_fdm_values[]) = { "manual", "expr", "marker", "indent",
static char *(p_fcl_values[]) = { "all", NULL };
static char *(p_cot_values[]) = { "menu", "menuone", "longest", "preview",
"noinsert", "noselect", NULL };
static char *(p_ics_values[]) = { "nosplit", "split", NULL };
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "option.c.generated.h"
@@ -3110,9 +3111,13 @@ did_set_string_option (
else if (gvarp == &p_cino) {
/* TODO: recognize errors */
parse_cino(curbuf);
}
/* Options that are a list of flags. */
else {
// incsubstitute
} else if (varp == &p_ics) {
if (check_opt_strings(p_ics, p_ics_values, false) != OK) {
errmsg = e_invarg;
}
// Options that are a list of flags.
} else {
p = NULL;
if (varp == &p_ww)
p = (char_u *)WW_ALL;