1
0
forked from aniani/vim

patch 7.4.2090

Problem:    Using submatch() in a lambda passed to substitute() is verbose.
Solution:   Use a static list and pass it as an optional argument to the
            function.  Fix memory leak.
This commit is contained in:
Bram Moolenaar
2016-07-22 21:50:18 +02:00
parent 36edf0685c
commit df48fb456f
13 changed files with 184 additions and 45 deletions

View File

@@ -1244,6 +1244,14 @@ struct listvar_S
list_T *lv_used_prev; /* previous list in used lists list */
};
/*
* Static list with 10 items. Use init_static_list() to initialize.
*/
typedef struct {
list_T sl_list; /* must be first */
listitem_T sl_items[10];
} staticList10_T;
/*
* Structure to hold an item of a Dictionary.
* Also used for a variable.