• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisionb7e381d7e8b869bd0065d15277d691ac5e9bd0aa (tree)
Time2022-11-22 22:30:04
AuthorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

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

patch 9.0.0919: build failure with tiny features
Problem: Build failure with tiny features.
Solution: Adjust #ifdef's.

Change Summary

Incremental Difference

diff -r 7bff4aaf060c -r b7e381d7e8b8 src/version.c
--- a/src/version.c Tue Nov 22 14:00:04 2022 +0100
+++ b/src/version.c Tue Nov 22 14:30:04 2022 +0100
@@ -696,6 +696,8 @@
696696 static int included_patches[] =
697697 { /* Add new patch number below this line */
698698 /**/
699+ 919,
700+/**/
699701 918,
700702 /**/
701703 917,
diff -r 7bff4aaf060c -r b7e381d7e8b8 src/window.c
--- a/src/window.c Tue Nov 22 14:00:04 2022 +0100
+++ b/src/window.c Tue Nov 22 14:30:04 2022 +0100
@@ -2872,6 +2872,7 @@
28722872 }
28732873 }
28742874
2875+#ifdef FEAT_EVAL
28752876 /*
28762877 * Create a dictionary with information about size and scroll changes in a
28772878 * window.
@@ -2918,6 +2919,7 @@
29182919 dict_unref(d);
29192920 return NULL;
29202921 }
2922+#endif
29212923
29222924 // Return values of check_window_scroll_resize():
29232925 #define CWSR_SCROLLED 1 // at least one window scrolled
@@ -2945,16 +2947,18 @@
29452947 int *size_count,
29462948 win_T **first_scroll_win,
29472949 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)
29502952 {
29512953 int result = 0;
2954+#ifdef FEAT_EVAL
29522955 int listidx = 0;
29532956 int tot_width = 0;
29542957 int tot_height = 0;
29552958 int tot_topline = 0;
29562959 int tot_leftcol = 0;
29572960 int tot_skipcol = 0;
2961+#endif
29582962
29592963 win_T *wp;
29602964 FOR_ALL_WINDOWS(wp)
@@ -2964,6 +2968,7 @@
29642968 if (size_changed)
29652969 {
29662970 result |= CWSR_RESIZED;
2971+#ifdef FEAT_EVAL
29672972 if (winlist != NULL)
29682973 {
29692974 // Add this window to the list of changed windows.
@@ -2973,7 +2978,9 @@
29732978 tv.vval.v_number = wp->w_id;
29742979 list_set_item(winlist, listidx++, &tv);
29752980 }
2976- else if (size_count != NULL)
2981+ else
2982+#endif
2983+ if (size_count != NULL)
29772984 {
29782985 ++*size_count;
29792986 if (*first_size_win == NULL)
@@ -2995,6 +3002,7 @@
29953002 *first_scroll_win = wp;
29963003 }
29973004
3005+#ifdef FEAT_EVAL
29983006 if ((size_changed || scroll_changed) && v_event != NULL)
29993007 {
30003008 // Add info about this window to the v:event dictionary.
@@ -3022,8 +3030,10 @@
30223030 tot_leftcol += abs(leftcol);
30233031 tot_skipcol += abs(skipcol);
30243032 }
3025- }
3026-
3033+#endif
3034+ }
3035+
3036+#ifdef FEAT_EVAL
30273037 if (v_event != NULL)
30283038 {
30293039 dict_T *alldict = make_win_info_dict(tot_width, tot_height,
@@ -3036,6 +3046,7 @@
30363046 --alldict->dv_refcount;
30373047 }
30383048 }
3049+#endif
30393050
30403051 return result;
30413052 }
@@ -3067,7 +3078,7 @@
30673078 int trigger_scroll = do_scroll && cwsr != 0;
30683079 if (!trigger_resize && !trigger_scroll)
30693080 return; // no relevant changes
3070-
3081+#ifdef FEAT_EVAL
30713082 list_T *windows_list = NULL;
30723083 if (trigger_resize)
30733084 {
@@ -3088,6 +3099,7 @@
30883099 scroll_dict);
30893100 }
30903101 }
3102+#endif
30913103
30923104 // WinScrolled/WinResized are triggered only once, even when multiple
30933105 // windows scrolled or changed size. Store the current values before
@@ -3103,24 +3115,28 @@
31033115 // If both are to be triggered do WinResized first.
31043116 if (trigger_resize)
31053117 {
3118+#ifdef FEAT_EVAL
31063119 save_v_event_T save_v_event;
31073120 dict_T *v_event = get_v_event(&save_v_event);
31083121
31093122 if (dict_add_list(v_event, "windows", windows_list) == OK)
31103123 {
31113124 dict_set_items_ro(v_event);
3112-
3125+#endif
31133126 char_u winid[NUMBUFLEN];
31143127 vim_snprintf((char *)winid, sizeof(winid), "%d",
31153128 first_size_win->w_id);
31163129 apply_autocmds(EVENT_WINRESIZED, winid, winid, FALSE,
31173130 first_size_win->w_buffer);
3131+#ifdef FEAT_EVAL
31183132 }
31193133 restore_v_event(v_event, &save_v_event);
3134+#endif
31203135 }
31213136
31223137 if (trigger_scroll)
31233138 {
3139+#ifdef FEAT_EVAL
31243140 save_v_event_T save_v_event;
31253141 dict_T *v_event = get_v_event(&save_v_event);
31263142
@@ -3128,14 +3144,15 @@
31283144 dict_extend(v_event, scroll_dict, (char_u *)"move", NULL);
31293145 dict_set_items_ro(v_event);
31303146 dict_unref(scroll_dict);
3131-
3147+#endif
31323148 char_u winid[NUMBUFLEN];
31333149 vim_snprintf((char *)winid, sizeof(winid), "%d",
31343150 first_scroll_win->w_id);
31353151 apply_autocmds(EVENT_WINSCROLLED, winid, winid, FALSE,
31363152 first_scroll_win->w_buffer);
3137-
3153+#ifdef FEAT_EVAL
31383154 restore_v_event(v_event, &save_v_event);
3155+#endif
31393156 }
31403157
31413158 recursive = FALSE;
Show on old repository browser