Hello Vim developers; attached is a patch for an issue that cropped up
for me when rebuilding Vim without +diff (FEAT_DIFF) since the recent
work on 'signcolumn'.
--
Tom Ryder <https://sanctum.geek.nz/>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20190618215109.GD1739%40conan.
For more options, visit https://groups.google.com/d/optout.
>From 06d6fdeb5fba544f1633103cb91d377e541c08de Mon Sep 17 00:00:00 2001
From: Tom Ryder <[email protected]>
Date: Wed, 19 Jun 2019 09:18:40 +1200
Subject: [PATCH] Include but zero diff-related params if no feature
The function get_sign_display_info() in screen.c includes parameters for
integers filler_lines and filler_todo, but these are only declared and
defined if FEAT_DIFF is defined for the +diff feature. If that feature
is excluded, but signs are included, compilation to screen.o fails.
This patch declares the two integers unconditionally, but defines them
to zero later on if the feature is unavailable.
---
src/screen.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/screen.c b/src/screen.c
index 016355e5d..c56979373 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -3237,9 +3237,9 @@ win_line(
int mb_c = 0; /* decoded multi-byte character
*/
int mb_utf8 = FALSE; /* screen char is UTF-8 char */
int u8cc[MAX_MCO]; /* composing UTF-8 chars */
-#ifdef FEAT_DIFF
int filler_lines; /* nr of filler lines to be
drawn */
int filler_todo; /* nr of filler lines still to
do + 1 */
+#ifdef FEAT_DIFF
hlf_T diff_hlf = (hlf_T)0; /* type of diff highlighting */
int change_start = MAXCOL; /* first col of changed area */
int change_end = -1; /* last col of changed area */
@@ -3569,8 +3569,10 @@ win_line(
}
if (lnum == wp->w_topline)
filler_lines = wp->w_topfill;
+#else
+ filler_lines = 0;
+#endif
filler_todo = filler_lines;
-#endif
#ifdef LINE_ATTR
# ifdef FEAT_SIGNS
--
2.22.0