aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-04-21 00:33:12 +0300
committerZyX <kp-pav@yandex.ru>2017-04-21 00:33:12 +0300
commitd463c9e03a79e981faaaa985b1160c292d08e172 (patch)
tree8ebfb9bc003f76a6be2d84035c52c6fdd24afbb5 /src/nvim/option.c
parentc289986c89dd0189ed8ab709bf2eb822c493542a (diff)
parent19646a2985e54dfc561a90a70054522afc052a45 (diff)
downloadrneovim-d463c9e03a79e981faaaa985b1160c292d08e172.tar.gz
rneovim-d463c9e03a79e981faaaa985b1160c292d08e172.tar.bz2
rneovim-d463c9e03a79e981faaaa985b1160c292d08e172.zip
Merge branch 'master' into lazier-arg_errmsg-gettext
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index 458d80716c..b8d153500e 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -1,3 +1,6 @@
+// This is an open source non-commercial project. Dear PVS-Studio, please check
+// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
+
// User-settable options. Checklist for adding a new option:
// - Put it in options.lua
// - For a global option: Add a variable for it in option_defs.h.
@@ -4223,7 +4226,7 @@ static char *set_num_option(int opt_idx, char_u *varp, long value,
} else if (pp == &curbuf->b_p_scbk || pp == &p_scbk) {
// 'scrollback'
if (*pp < -1 || *pp > SB_MAX
- || (opt_flags == OPT_LOCAL && !curbuf->terminal)) {
+ || (*pp != -1 && opt_flags == OPT_LOCAL && !curbuf->terminal)) {
errmsg = e_invarg;
*pp = old_value;
} else if (curbuf->terminal) {
@@ -4818,7 +4821,7 @@ int find_key_option_len(const char_u *arg, size_t len)
} else {
arg--; // put arg at the '<'
modifiers = 0;
- key = find_special_key(&arg, len + 1, &modifiers, true, true);
+ key = find_special_key(&arg, len + 1, &modifiers, true, true, false);
if (modifiers) { // can't handle modifiers here
key = 0;
}
@@ -6974,7 +6977,7 @@ bool signcolumn_on(win_T *wp)
/// Get window or buffer local options
dict_T *get_winbuf_options(const int bufopt)
- FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_MALLOC
+ FUNC_ATTR_WARN_UNUSED_RESULT
{
dict_T *const d = tv_dict_alloc();