mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
updated for version 7.4.151
Problem: Python: slices with steps are not supported. Solution: Support slices in Python vim.List. (ZyX)
This commit is contained in:
11
src/eval.c
11
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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user