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:
21
src/list.c
21
src/list.c
@@ -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]".
|
||||
|
||||
Reference in New Issue
Block a user