diff options
Diffstat (limited to 'src/list.c')
-rw-r--r-- | src/list.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/list.c b/src/list.c index 4531e5885..2b44ebacb 100644 --- a/src/list.c +++ b/src/list.c @@ -2188,10 +2188,13 @@ filter_map(typval_T *argvars, typval_T *rettv, filtermap_T filtermap) int stride = l->lv_u.nonmat.lv_stride; // List from range(): loop over the numbers - l->lv_first = NULL; - l->lv_u.mat.lv_last = NULL; - l->lv_len = 0; - l->lv_u.mat.lv_idx_item = NULL; + if (filtermap != FILTERMAP_MAPNEW) + { + l->lv_first = NULL; + l->lv_u.mat.lv_last = NULL; + l->lv_len = 0; + l->lv_u.mat.lv_idx_item = NULL; + } for (idx = 0; idx < len; ++idx) { |