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, 6 insertions, 5 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 7cf8412269..d60c8bc01c 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -320,7 +320,7 @@ static char *(p_scl_values[]) = { "yes", "no", "auto", "auto:1", "auto:2",
"auto:3", "auto:4", "auto:5", "auto:6", "auto:7", "auto:8", "auto:9",
"yes:1", "yes:2", "yes:3", "yes:4", "yes:5", "yes:6", "yes:7", "yes:8",
"yes:9", "number", NULL };
-static char *(p_fdc_values[]) = { "auto:1", "auto:2",
+static char *(p_fdc_values[]) = { "auto", "auto:1", "auto:2",
"auto:3", "auto:4", "auto:5", "auto:6", "auto:7", "auto:8", "auto:9",
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", NULL };
@@ -4338,6 +4338,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value,
char buf_old[NUMBUFLEN];
char buf_new[NUMBUFLEN];
char buf_type[7];
+
vim_snprintf(buf_old, ARRAY_SIZE(buf_old), "%ld", old_value);
vim_snprintf(buf_new, ARRAY_SIZE(buf_new), "%ld", value);
vim_snprintf(buf_type, ARRAY_SIZE(buf_type), "%s",
@@ -7159,20 +7160,20 @@ dict_T *get_winbuf_options(const int bufopt)
/// Return the effective 'scrolloff' value for the current window, using the
/// global value when appropriate.
-long get_scrolloff_value(void)
+long get_scrolloff_value(win_T *wp)
{
// Disallow scrolloff in terminal-mode. #11915
if (State & TERM_FOCUS) {
return 0;
}
- return curwin->w_p_so < 0 ? p_so : curwin->w_p_so;
+ return wp->w_p_so < 0 ? p_so : wp->w_p_so;
}
/// Return the effective 'sidescrolloff' value for the current window, using the
/// global value when appropriate.
-long get_sidescrolloff_value(void)
+long get_sidescrolloff_value(win_T *wp)
{
- return curwin->w_p_siso < 0 ? p_siso : curwin->w_p_siso;
+ return wp->w_p_siso < 0 ? p_siso : wp->w_p_siso;
}
Dictionary get_vimoption(String name, Error *err)