diff options
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 1a40bac91a..16c4abfa2a 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -948,7 +948,7 @@ void ex_set(exarg_T *eap) if (eap->forceit) { flags |= OPT_ONECOLUMN; } - (void)do_set(eap->arg, flags); + (void)do_set((char_u *)eap->arg, flags); } /// Parse 'arg' for option settings. @@ -6698,12 +6698,12 @@ void set_context_in_set_cmd(expand_T *xp, char_u *arg, int opt_flags) xp->xp_context = EXPAND_SETTINGS; if (*arg == NUL) { - xp->xp_pattern = arg; + xp->xp_pattern = (char *)arg; return; } p = arg + STRLEN(arg) - 1; if (*p == ' ' && *(p - 1) != '\\') { - xp->xp_pattern = p + 1; + xp->xp_pattern = (char *)p + 1; return; } while (p > arg) { @@ -6729,7 +6729,8 @@ void set_context_in_set_cmd(expand_T *xp, char_u *arg, int opt_flags) xp->xp_context = EXPAND_BOOL_SETTINGS; p += 3; } - xp->xp_pattern = arg = p; + xp->xp_pattern = (char *)p; + arg = p; if (*arg == '<') { while (*p != '>') { if (*p++ == NUL) { // expand terminal option name @@ -6796,7 +6797,7 @@ void set_context_in_set_cmd(expand_T *xp, char_u *arg, int opt_flags) } else { expand_option_idx = opt_idx; } - xp->xp_pattern = p + 1; + xp->xp_pattern = (char *)p + 1; return; } xp->xp_context = EXPAND_NOTHING; @@ -6804,7 +6805,7 @@ void set_context_in_set_cmd(expand_T *xp, char_u *arg, int opt_flags) return; } - xp->xp_pattern = p + 1; + xp->xp_pattern = (char *)p + 1; if (flags & P_EXPAND) { p = options[opt_idx].var; @@ -6837,16 +6838,16 @@ void set_context_in_set_cmd(expand_T *xp, char_u *arg, int opt_flags) // For an option that is a list of file names, find the start of the // last file name. - for (p = arg + STRLEN(arg) - 1; p > xp->xp_pattern; p--) { + for (p = arg + STRLEN(arg) - 1; p > (char_u *)xp->xp_pattern; p--) { // count number of backslashes before ' ' or ',' if (*p == ' ' || *p == ',') { s = p; - while (s > xp->xp_pattern && *(s - 1) == '\\') { + while (s > (char_u *)xp->xp_pattern && *(s - 1) == '\\') { s--; } if ((*p == ' ' && (xp->xp_backslash == XP_BS_THREE && (p - s) < 3)) || (*p == ',' && (flags & P_COMMA) && ((p - s) & 1) == 0)) { - xp->xp_pattern = p + 1; + xp->xp_pattern = (char *)p + 1; break; } } @@ -6854,7 +6855,7 @@ void set_context_in_set_cmd(expand_T *xp, char_u *arg, int opt_flags) // for 'spellsuggest' start at "file:" if (options[opt_idx].var == (char_u *)&p_sps && STRNCMP(p, "file:", 5) == 0) { - xp->xp_pattern = p + 5; + xp->xp_pattern = (char *)p + 5; break; } } |