comparison src/structs.h @ 34126:da670b1549b3 v9.1.0027

patch 9.1.0027: Vim is missing a foreach() func Commit: https://github.com/vim/vim/commit/e79e2077607e8f829ba823308c91104a795736ba Author: Ernie Rael <errael@raelity.com> Date: Sat Jan 13 11:47:33 2024 +0100 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 <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 13 Jan 2024 12:00:06 +0100
parents 14b69ff2c1ab
children 36843e079f64
comparison
equal deleted inserted replaced
34125:93171f4925c5 34126:da670b1549b3
4877 typedef struct { 4877 typedef struct {
4878 int sve_did_save; 4878 int sve_did_save;
4879 hashtab_T sve_hashtab; 4879 hashtab_T sve_hashtab;
4880 } save_v_event_T; 4880 } save_v_event_T;
4881 4881
4882 // Enum used by filter(), map() and mapnew() 4882 // Enum used by filter(), map(), mapnew() and foreach()
4883 typedef enum { 4883 typedef enum {
4884 FILTERMAP_FILTER, 4884 FILTERMAP_FILTER,
4885 FILTERMAP_MAP, 4885 FILTERMAP_MAP,
4886 FILTERMAP_MAPNEW 4886 FILTERMAP_MAPNEW,
4887 FILTERMAP_FOREACH
4887 } filtermap_T; 4888 } filtermap_T;
4888 4889
4889 // Structure used by switch_win() to pass values to restore_win() 4890 // Structure used by switch_win() to pass values to restore_win()
4890 typedef struct { 4891 typedef struct {
4891 win_T *sw_curwin; 4892 win_T *sw_curwin;