aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 81919c00d2..761e4451b9 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -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;