summaryrefslogtreecommitdiff
path: root/src/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 693896cff..65f4b1138 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -6425,6 +6425,16 @@ list_insert_tv(l, tv, item)
if (ni == NULL)
return FAIL;
copy_tv(tv, &ni->li_tv);
+ list_insert(l, ni, item);
+ return OK;
+}
+
+ void
+list_insert(l, ni, item)
+ list_T *l;
+ listitem_T *ni;
+ listitem_T *item;
+{
if (item == NULL)
/* Append new item at end of list. */
list_append(l, ni);
@@ -6446,7 +6456,6 @@ list_insert_tv(l, tv, item)
item->li_prev = ni;
++l->lv_len;
}
- return OK;
}
/*