1
0
forked from aniani/vim

patch 8.0.1497: getting the jump list requires parsing the output of :jumps

Problem:    Getting the jump list requires parsing the output of :jumps.
Solution:   Add getjumplist(). (Yegappan Lakshmanan, closes #2609)
This commit is contained in:
Bram Moolenaar
2018-02-10 21:06:32 +01:00
parent d23a823669
commit 4f50588ba3
9 changed files with 170 additions and 5 deletions

View File

@@ -474,6 +474,27 @@ list_append_dict(list_T *list, dict_T *dict)
return OK;
}
/*
* Append list2 to list1.
* Return FAIL when out of memory.
*/
int
list_append_list(list1, list2)
list_T *list1;
list_T *list2;
{
listitem_T *li = listitem_alloc();
if (li == NULL)
return FAIL;
li->li_tv.v_type = VAR_LIST;
li->li_tv.v_lock = 0;
li->li_tv.vval.v_list = list2;
list_append(list1, li);
++list2->lv_refcount;
return OK;
}
/*
* Make a copy of "str" and append it as an item to list "l".
* When "len" >= 0 use "str[len]".