Mercurial > vim
comparison src/proto/list.pro @ 23604:1816ea68c022 v8.2.2344
patch 8.2.2344: using inclusive index for slice is not always desired
Commit: https://github.com/vim/vim/commit/6601b62943a19d4f8818c3638440663d67a17b6a
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 13 21:47:15 2021 +0100
patch 8.2.2344: using inclusive index for slice is not always desired
Problem: Using inclusive index for slice is not always desired.
Solution: Add the slice() method, which has an exclusive index. (closes
#7408)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 13 Jan 2021 22:00:04 +0100 |
parents | 510088f8c66f |
children | 525c9e218c69 |
comparison
equal
deleted
inserted
replaced
23603:483d395694b0 | 23604:1816ea68c022 |
---|---|
32 void list_insert(list_T *l, listitem_T *ni, listitem_T *item); | 32 void list_insert(list_T *l, listitem_T *ni, listitem_T *item); |
33 void f_flatten(typval_T *argvars, typval_T *rettv); | 33 void f_flatten(typval_T *argvars, typval_T *rettv); |
34 int list_extend(list_T *l1, list_T *l2, listitem_T *bef); | 34 int list_extend(list_T *l1, list_T *l2, listitem_T *bef); |
35 int list_concat(list_T *l1, list_T *l2, typval_T *tv); | 35 int list_concat(list_T *l1, list_T *l2, typval_T *tv); |
36 list_T *list_slice(list_T *ol, long n1, long n2); | 36 list_T *list_slice(list_T *ol, long n1, long n2); |
37 int list_slice_or_index(list_T *list, int range, long n1_arg, long n2_arg, typval_T *rettv, int verbose); | 37 int list_slice_or_index(list_T *list, int range, varnumber_T n1_arg, varnumber_T n2_arg, int exclusive, typval_T *rettv, int verbose); |
38 list_T *list_copy(list_T *orig, int deep, int copyID); | 38 list_T *list_copy(list_T *orig, int deep, int copyID); |
39 void vimlist_remove(list_T *l, listitem_T *item, listitem_T *item2); | 39 void vimlist_remove(list_T *l, listitem_T *item, listitem_T *item2); |
40 char_u *list2string(typval_T *tv, int copyID, int restore_copyID); | 40 char_u *list2string(typval_T *tv, int copyID, int restore_copyID); |
41 int list_join(garray_T *gap, list_T *l, char_u *sep, int echo_style, int restore_copyID, int copyID); | 41 int list_join(garray_T *gap, list_T *l, char_u *sep, int echo_style, int restore_copyID, int copyID); |
42 void f_join(typval_T *argvars, typval_T *rettv); | 42 void f_join(typval_T *argvars, typval_T *rettv); |