diff options
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 27b80c0ac8..e261f06b42 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1977,8 +1977,8 @@ static const char *did_set_cmdheight(optset_T *args) { OptInt old_value = args->os_oldval.number; - if (p_ch > Rows - min_rows() + 1) { - p_ch = Rows - min_rows() + 1; + if (p_ch > Rows - min_rows(curtab) + 1) { + p_ch = Rows - min_rows(curtab) + 1; } // if p_ch changed value, change the command line height @@ -2199,13 +2199,6 @@ static const char *did_set_modified(optset_T *args) return NULL; } -/// Process the updated 'msghistory' option value. -static const char *did_set_msghistory(optset_T *args FUNC_ATTR_UNUSED) -{ - check_msg_hist(); - return NULL; -} - /// Process the updated 'number' or 'relativenumber' option value. static const char *did_set_number_relativenumber(optset_T *args) { @@ -2764,10 +2757,11 @@ static const char *check_num_option_bounds(OptIndex opt_idx, OptInt *newval, cha switch (opt_idx) { case kOptLines: - if (*newval < min_rows() && full_screen) { - vim_snprintf(errbuf, errbuflen, _("E593: Need at least %d lines"), min_rows()); + if (*newval < min_rows_for_all_tabpages() && full_screen) { + vim_snprintf(errbuf, errbuflen, _("E593: Need at least %d lines"), + min_rows_for_all_tabpages()); errmsg = errbuf; - *newval = min_rows(); + *newval = min_rows_for_all_tabpages(); } // True max size is defined by check_screensize(). *newval = MIN(*newval, INT_MAX); @@ -2885,13 +2879,6 @@ static const char *validate_num_option(OptIndex opt_idx, OptInt *newval, char *e return e_invarg; } break; - case kOptMsghistory: - if (value < 0) { - return e_positive; - } else if (value > 10000) { - return e_invarg; - } - break; case kOptPyxversion: if (value == 0) { *newval = 3; |