Mirror of the Vim source from https://github.com/vim/vim
Revision | b7e381d7e8b869bd0065d15277d691ac5e9bd0aa (tree) |
---|---|
Time | 2022-11-22 22:30:04 |
Author | Bram Moolenaar <Bram@vim....> |
Commiter | Bram Moolenaar |
patch 9.0.0919: build failure with tiny features
Commit: https://github.com/vim/vim/commit/9c5b7cb4cf67c64648a324e9dfd1e17d793335a4
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Nov 22 13:29:20 2022 +0000
@@ -696,6 +696,8 @@ | ||
696 | 696 | static int included_patches[] = |
697 | 697 | { /* Add new patch number below this line */ |
698 | 698 | /**/ |
699 | + 919, | |
700 | +/**/ | |
699 | 701 | 918, |
700 | 702 | /**/ |
701 | 703 | 917, |
@@ -2872,6 +2872,7 @@ | ||
2872 | 2872 | } |
2873 | 2873 | } |
2874 | 2874 | |
2875 | +#ifdef FEAT_EVAL | |
2875 | 2876 | /* |
2876 | 2877 | * Create a dictionary with information about size and scroll changes in a |
2877 | 2878 | * window. |
@@ -2918,6 +2919,7 @@ | ||
2918 | 2919 | dict_unref(d); |
2919 | 2920 | return NULL; |
2920 | 2921 | } |
2922 | +#endif | |
2921 | 2923 | |
2922 | 2924 | // Return values of check_window_scroll_resize(): |
2923 | 2925 | #define CWSR_SCROLLED 1 // at least one window scrolled |
@@ -2945,16 +2947,18 @@ | ||
2945 | 2947 | int *size_count, |
2946 | 2948 | win_T **first_scroll_win, |
2947 | 2949 | win_T **first_size_win, |
2948 | - list_T *winlist, | |
2949 | - dict_T *v_event) | |
2950 | + list_T *winlist UNUSED, | |
2951 | + dict_T *v_event UNUSED) | |
2950 | 2952 | { |
2951 | 2953 | int result = 0; |
2954 | +#ifdef FEAT_EVAL | |
2952 | 2955 | int listidx = 0; |
2953 | 2956 | int tot_width = 0; |
2954 | 2957 | int tot_height = 0; |
2955 | 2958 | int tot_topline = 0; |
2956 | 2959 | int tot_leftcol = 0; |
2957 | 2960 | int tot_skipcol = 0; |
2961 | +#endif | |
2958 | 2962 | |
2959 | 2963 | win_T *wp; |
2960 | 2964 | FOR_ALL_WINDOWS(wp) |
@@ -2964,6 +2968,7 @@ | ||
2964 | 2968 | if (size_changed) |
2965 | 2969 | { |
2966 | 2970 | result |= CWSR_RESIZED; |
2971 | +#ifdef FEAT_EVAL | |
2967 | 2972 | if (winlist != NULL) |
2968 | 2973 | { |
2969 | 2974 | // Add this window to the list of changed windows. |
@@ -2973,7 +2978,9 @@ | ||
2973 | 2978 | tv.vval.v_number = wp->w_id; |
2974 | 2979 | list_set_item(winlist, listidx++, &tv); |
2975 | 2980 | } |
2976 | - else if (size_count != NULL) | |
2981 | + else | |
2982 | +#endif | |
2983 | + if (size_count != NULL) | |
2977 | 2984 | { |
2978 | 2985 | ++*size_count; |
2979 | 2986 | if (*first_size_win == NULL) |
@@ -2995,6 +3002,7 @@ | ||
2995 | 3002 | *first_scroll_win = wp; |
2996 | 3003 | } |
2997 | 3004 | |
3005 | +#ifdef FEAT_EVAL | |
2998 | 3006 | if ((size_changed || scroll_changed) && v_event != NULL) |
2999 | 3007 | { |
3000 | 3008 | // Add info about this window to the v:event dictionary. |
@@ -3022,8 +3030,10 @@ | ||
3022 | 3030 | tot_leftcol += abs(leftcol); |
3023 | 3031 | tot_skipcol += abs(skipcol); |
3024 | 3032 | } |
3025 | - } | |
3026 | - | |
3033 | +#endif | |
3034 | + } | |
3035 | + | |
3036 | +#ifdef FEAT_EVAL | |
3027 | 3037 | if (v_event != NULL) |
3028 | 3038 | { |
3029 | 3039 | dict_T *alldict = make_win_info_dict(tot_width, tot_height, |
@@ -3036,6 +3046,7 @@ | ||
3036 | 3046 | --alldict->dv_refcount; |
3037 | 3047 | } |
3038 | 3048 | } |
3049 | +#endif | |
3039 | 3050 | |
3040 | 3051 | return result; |
3041 | 3052 | } |
@@ -3067,7 +3078,7 @@ | ||
3067 | 3078 | int trigger_scroll = do_scroll && cwsr != 0; |
3068 | 3079 | if (!trigger_resize && !trigger_scroll) |
3069 | 3080 | return; // no relevant changes |
3070 | - | |
3081 | +#ifdef FEAT_EVAL | |
3071 | 3082 | list_T *windows_list = NULL; |
3072 | 3083 | if (trigger_resize) |
3073 | 3084 | { |
@@ -3088,6 +3099,7 @@ | ||
3088 | 3099 | scroll_dict); |
3089 | 3100 | } |
3090 | 3101 | } |
3102 | +#endif | |
3091 | 3103 | |
3092 | 3104 | // WinScrolled/WinResized are triggered only once, even when multiple |
3093 | 3105 | // windows scrolled or changed size. Store the current values before |
@@ -3103,24 +3115,28 @@ | ||
3103 | 3115 | // If both are to be triggered do WinResized first. |
3104 | 3116 | if (trigger_resize) |
3105 | 3117 | { |
3118 | +#ifdef FEAT_EVAL | |
3106 | 3119 | save_v_event_T save_v_event; |
3107 | 3120 | dict_T *v_event = get_v_event(&save_v_event); |
3108 | 3121 | |
3109 | 3122 | if (dict_add_list(v_event, "windows", windows_list) == OK) |
3110 | 3123 | { |
3111 | 3124 | dict_set_items_ro(v_event); |
3112 | - | |
3125 | +#endif | |
3113 | 3126 | char_u winid[NUMBUFLEN]; |
3114 | 3127 | vim_snprintf((char *)winid, sizeof(winid), "%d", |
3115 | 3128 | first_size_win->w_id); |
3116 | 3129 | apply_autocmds(EVENT_WINRESIZED, winid, winid, FALSE, |
3117 | 3130 | first_size_win->w_buffer); |
3131 | +#ifdef FEAT_EVAL | |
3118 | 3132 | } |
3119 | 3133 | restore_v_event(v_event, &save_v_event); |
3134 | +#endif | |
3120 | 3135 | } |
3121 | 3136 | |
3122 | 3137 | if (trigger_scroll) |
3123 | 3138 | { |
3139 | +#ifdef FEAT_EVAL | |
3124 | 3140 | save_v_event_T save_v_event; |
3125 | 3141 | dict_T *v_event = get_v_event(&save_v_event); |
3126 | 3142 |
@@ -3128,14 +3144,15 @@ | ||
3128 | 3144 | dict_extend(v_event, scroll_dict, (char_u *)"move", NULL); |
3129 | 3145 | dict_set_items_ro(v_event); |
3130 | 3146 | dict_unref(scroll_dict); |
3131 | - | |
3147 | +#endif | |
3132 | 3148 | char_u winid[NUMBUFLEN]; |
3133 | 3149 | vim_snprintf((char *)winid, sizeof(winid), "%d", |
3134 | 3150 | first_scroll_win->w_id); |
3135 | 3151 | apply_autocmds(EVENT_WINSCROLLED, winid, winid, FALSE, |
3136 | 3152 | first_scroll_win->w_buffer); |
3137 | - | |
3153 | +#ifdef FEAT_EVAL | |
3138 | 3154 | restore_v_event(v_event, &save_v_event); |
3155 | +#endif | |
3139 | 3156 | } |
3140 | 3157 | |
3141 | 3158 | recursive = FALSE; |