aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/eval.c2
-rw-r--r--src/nvim/testdir/test55.in5
-rw-r--r--src/nvim/testdir/test55.ok1
-rw-r--r--src/nvim/version.c2
4 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 116944b28d..97d778327b 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -2247,7 +2247,7 @@ static void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv, int copy, ch
int ll_n1 = lp->ll_n1;
// Check whether any of the list items is locked
- for (listitem_T *ri = rettv->vval.v_list->lv_first; ri != NULL; ) {
+ for (listitem_T *ri = rettv->vval.v_list->lv_first; ri != NULL && ll_li != NULL; ) {
if (tv_check_lock(ll_li->li_tv.v_lock, lp->ll_name)) {
return;
}
diff --git a/src/nvim/testdir/test55.in b/src/nvim/testdir/test55.in
index 140cb7c0e5..c4e82d429c 100644
--- a/src/nvim/testdir/test55.in
+++ b/src/nvim/testdir/test55.in
@@ -401,6 +401,11 @@ let l = [0, 1, 2, 3]
: $put =v:exception[:15] . v:exception[-1:-1]
:endtry
:$put =string(d)
+:"
+:" test for range assign
+:let l = [0]
+:let l[:] = [1, 2]
+:$put =string(l)
:endfun
:"
:call Test(1, 2, [3, 4], {5: 6}) " This may take a while
diff --git a/src/nvim/testdir/test55.ok b/src/nvim/testdir/test55.ok
index e8560de401..ba029b2898 100644
--- a/src/nvim/testdir/test55.ok
+++ b/src/nvim/testdir/test55.ok
@@ -129,6 +129,7 @@ caught a:000[3]
{'a': {'b': 'B'}}
Vim(call):E737: a
{'a': {'b': 'B'}}
+[1, 2]
Vim(foldopen):E490:
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 90c133ea54..4d0e950b24 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -197,7 +197,7 @@ static int included_patches[] = {
//544 NA
543,
//542,
- //541,
+ 541,
//540 NA
//539,
538,