diff options
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 1c07bef3e3..88108b14a2 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -887,7 +887,7 @@ static struct vimoption SCRIPTID_INIT}, {"history", "hi", P_NUM|P_VIM, (char_u *)&p_hi, PV_NONE, - {(char_u *)0L, (char_u *)20L} SCRIPTID_INIT}, + {(char_u *)0L, (char_u *)50L} SCRIPTID_INIT}, {"hkmap", "hk", P_BOOL|P_VI_DEF|P_VIM, (char_u *)&p_hkmap, PV_NONE, {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, @@ -2237,7 +2237,7 @@ void set_number_default(char *name, long val) options[opt_idx].def_val[VI_DEFAULT] = (char_u *)val; } -#if defined(EXITFREE) || defined(PROTO) +#if defined(EXITFREE) /* * Free all options. */ @@ -2918,7 +2918,7 @@ do_set ( */ else if (varp == (char_u *)&p_bs && VIM_ISDIGIT(**(char_u **)varp)) { - i = getdigits((char_u **)varp); + i = getdigits_int((char_u **)varp); switch (i) { case 0: *(char_u **)varp = empty_option; @@ -2943,7 +2943,7 @@ do_set ( else if (varp == (char_u *)&p_ww && VIM_ISDIGIT(*arg)) { *errbuf = NUL; - i = getdigits(&arg); + i = getdigits_int(&arg); if (i & 1) STRCAT(errbuf, "b,"); if (i & 2) @@ -4359,7 +4359,7 @@ did_set_string_option ( /* set ru_wid if 'ruf' starts with "%99(" */ if (*++s == '-') /* ignore a '-' */ s++; - wid = getdigits(&s); + wid = getdigits_int(&s); if (wid && *s == '(' && (errmsg = check_stl_option(p_ruf)) == NULL) ru_wid = wid; else @@ -4664,14 +4664,14 @@ char_u *check_colorcolumn(win_T *wp) ++s; if (!VIM_ISDIGIT(*s)) return e_invarg; - col = col * getdigits(&s); + col = col * getdigits_int(&s); if (wp->w_buffer->b_p_tw == 0) goto skip; /* 'textwidth' not set, skip this item */ col += wp->w_buffer->b_p_tw; if (col < 0) goto skip; } else if (VIM_ISDIGIT(*s)) - col = getdigits(&s); + col = getdigits_int(&s); else return e_invarg; color_cols[count++] = col - 1; /* 1-based to 0-based */ @@ -7257,7 +7257,6 @@ int ExpandSettings(expand_T *xp, regmatch_T *regmatch, int *num_file, char_u *** { int num_normal = 0; /* Nr of matching non-term-code settings */ int num_term = 0; /* Nr of matching terminal code settings */ - int opt_idx; int match; int count = 0; char_u *str; @@ -7283,7 +7282,7 @@ int ExpandSettings(expand_T *xp, regmatch_T *regmatch, int *num_file, char_u *** (*file)[count++] = vim_strsave((char_u *)names[match]); } } - for (opt_idx = 0; (str = (char_u *)options[opt_idx].fullname) != NULL; + for (size_t opt_idx = 0; (str = (char_u *)options[opt_idx].fullname) != NULL; opt_idx++) { if (options[opt_idx].var == NULL) continue; @@ -7326,7 +7325,7 @@ int ExpandSettings(expand_T *xp, regmatch_T *regmatch, int *num_file, char_u *** * Check terminal key codes, these are not in the option table */ if (xp->xp_context != EXPAND_BOOL_SETTINGS && num_normal == 0) { - for (opt_idx = 0; (str = get_termcode(opt_idx)) != NULL; opt_idx++) { + for (size_t opt_idx = 0; (str = get_termcode(opt_idx)) != NULL; opt_idx++) { if (!isprint(str[0]) || !isprint(str[1])) continue; @@ -7363,7 +7362,7 @@ int ExpandSettings(expand_T *xp, regmatch_T *regmatch, int *num_file, char_u *** * Check special key names. */ regmatch->rm_ic = TRUE; /* ignore case here */ - for (opt_idx = 0; (str = get_key_name(opt_idx)) != NULL; opt_idx++) { + for (size_t opt_idx = 0; (str = get_key_name(opt_idx)) != NULL; opt_idx++) { name_buf[0] = '<'; STRCPY(name_buf + 1, str); STRCAT(name_buf, ">"); @@ -8115,12 +8114,12 @@ static bool briopt_check(win_T *wp) && ((p[6] == '-' && VIM_ISDIGIT(p[7])) || VIM_ISDIGIT(p[6]))) { p += 6; - bri_shift = getdigits(&p); + bri_shift = getdigits_int(&p); } else if (STRNCMP(p, "min:", 4) == 0 && VIM_ISDIGIT(p[4])) { p += 4; - bri_min = getdigits(&p); + bri_min = getdigits_long(&p); } else if (STRNCMP(p, "sbr", 3) == 0) { |