From e79e2077607e8f829ba823308c91104a795736ba Mon Sep 17 00:00:00 2001 From: Ernie Rael Date: Sat, 13 Jan 2024 11:47:33 +0100 Subject: patch 9.1.0027: Vim is missing a foreach() func Problem: Vim is missing a foreach() func Solution: Implement foreach({expr1}, {expr2}) function, which applies {expr2} for each item in {expr1} without changing it (Ernie Rael) closes: #12166 Signed-off-by: Ernie Rael Signed-off-by: Christian Brabandt --- src/structs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/structs.h') diff --git a/src/structs.h b/src/structs.h index 6d77deb454..85f440d35d 100644 --- a/src/structs.h +++ b/src/structs.h @@ -4879,11 +4879,12 @@ typedef struct { hashtab_T sve_hashtab; } save_v_event_T; -// Enum used by filter(), map() and mapnew() +// Enum used by filter(), map(), mapnew() and foreach() typedef enum { FILTERMAP_FILTER, FILTERMAP_MAP, - FILTERMAP_MAPNEW + FILTERMAP_MAPNEW, + FILTERMAP_FOREACH } filtermap_T; // Structure used by switch_win() to pass values to restore_win() -- cgit v1.2.3