diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-02-10 21:06:32 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-02-10 21:06:32 +0100 |
commit | 4f50588ba336e7f086a72c53f5688c2494fc34b3 (patch) | |
tree | f597c3d9dbbe192278b5f5f134e3743ff386aaac /src/list.c | |
parent | d23a823669d93fb2a570a039173eefe4856ac806 (diff) | |
download | vim-git-4f50588ba336e7f086a72c53f5688c2494fc34b3.tar.gz |
patch 8.0.1497: getting the jump list requires parsing the output of :jumpsv8.0.1497
Problem: Getting the jump list requires parsing the output of :jumps.
Solution: Add getjumplist(). (Yegappan Lakshmanan, closes #2609)
Diffstat (limited to 'src/list.c')
-rw-r--r-- | src/list.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/list.c b/src/list.c index b593f7171..1dfaa210e 100644 --- a/src/list.c +++ b/src/list.c @@ -475,6 +475,27 @@ list_append_dict(list_T *list, dict_T *dict) } /* + * 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]". * Returns FAIL when out of memory. |