aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2021-09-11 12:12:59 -0700
committerGitHub <noreply@github.com>2021-09-11 12:12:59 -0700
commit413e86869ef147431a78946562c125938b41f533 (patch)
tree4499c79a08aa7d0d3815c577f3ad98fcbdfe5b0b /src/nvim/option.c
parente31652879e4ecfc63b450626209d09df79336de0 (diff)
parent7175efb518d09aad59f7917c15b7c9752e9e320e (diff)
downloadrneovim-413e86869ef147431a78946562c125938b41f533.tar.gz
rneovim-413e86869ef147431a78946562c125938b41f533.tar.bz2
rneovim-413e86869ef147431a78946562c125938b41f533.zip
Merge #14611 from seandewar/vim-8.1.1116
vim-patch:8.1.{1116,1188,1190,1355,1722,2035,2036,2038,2043},8.2.{0886,2309}
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index fdfb409c5e..23b488ea68 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -1276,9 +1276,9 @@ int do_set(
}
} else if (*arg == '-' || ascii_isdigit(*arg)) {
// Allow negative, octal and hex numbers.
- vim_str2nr(arg, NULL, &i, STR2NR_ALL, &value, NULL, 0);
- if (arg[i] != NUL && !ascii_iswhite(arg[i])) {
- errmsg = e_invarg;
+ vim_str2nr(arg, NULL, &i, STR2NR_ALL, &value, NULL, 0, true);
+ if (i == 0 || (arg[i] != NUL && !ascii_iswhite(arg[i]))) {
+ errmsg = (char_u *)N_("E521: Number required after =");
goto skip;
}
} else {
@@ -7486,7 +7486,7 @@ unsigned int get_bkc_value(buf_T *buf)
///
/// @param win If not NULL, the window to get the local option from; global
/// otherwise.
-char_u *get_showbreak_value(win_T *const win FUNC_ATTR_UNUSED)
+char_u *get_showbreak_value(win_T *const win)
FUNC_ATTR_WARN_UNUSED_RESULT
{
if (win->w_p_sbr == NULL || *win->w_p_sbr == NUL) {