aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/eval')
-rw-r--r--src/nvim/eval/funcs.c5
-rw-r--r--src/nvim/eval/typval.c2
-rw-r--r--src/nvim/eval/userfunc.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c
index eee40965e0..62a8022734 100644
--- a/src/nvim/eval/funcs.c
+++ b/src/nvim/eval/funcs.c
@@ -2987,11 +2987,12 @@ static void f_getchar(typval_T *argvars, typval_T *rettv, FunPtr fptr)
// illegal argument or getchar(0) and no char avail: return zero
n = 0;
} else {
- // getchar(0) and char avail: return char
+ // getchar(0) and char avail() != NUL: get a character.
+ // Note that vpeekc_any() returns K_SPECIAL for K_IGNORE.
n = safe_vgetc();
}
- if (n == K_IGNORE) {
+ if (n == K_IGNORE || n == K_VER_SCROLLBAR || n == K_HOR_SCROLLBAR) {
continue;
}
break;
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c
index ada6f78f10..b62820fecc 100644
--- a/src/nvim/eval/typval.c
+++ b/src/nvim/eval/typval.c
@@ -725,7 +725,7 @@ int tv_list_concat(list_T *const l1, list_T *const l2, typval_T *const tv)
list_T *l;
tv->v_type = VAR_LIST;
-
+ tv->v_lock = VAR_UNLOCKED;
if (l1 == NULL && l2 == NULL) {
l = NULL;
} else if (l1 == NULL) {
diff --git a/src/nvim/eval/userfunc.c b/src/nvim/eval/userfunc.c
index dc94bc698d..8daef00985 100644
--- a/src/nvim/eval/userfunc.c
+++ b/src/nvim/eval/userfunc.c
@@ -851,7 +851,7 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars,
v->di_flags = DI_FLAGS_RO | DI_FLAGS_FIX;
tv_dict_add(&fc->l_vars, v);
v->di_tv.v_type = VAR_DICT;
- v->di_tv.v_lock = 0;
+ v->di_tv.v_lock = VAR_UNLOCKED;
v->di_tv.vval.v_dict = selfdict;
++selfdict->dv_refcount;
}