Signed-off-by: Stefan Beller <sbel...@google.com> --- diff.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/diff.c b/diff.c index 7096457c8a..e6029e8213 100644 --- a/diff.c +++ b/diff.c @@ -565,6 +565,7 @@ enum diff_symbol { DIFF_SYMBOL_CONTEXT_FRAGINFO, DIFF_SYMBOL_NO_LF_EOF, DIFF_SYMBOL_CONTEXT, + DIFF_SYMBOL_CONTEXT_INCOMPLETE, DIFF_SYMBOL_PLUS, DIFF_SYMBOL_MINUS, DIFF_SYMBOL_WORDS_PORCELAIN, @@ -637,6 +638,11 @@ static void emit_diff_symbol(struct diff_options *o, enum diff_symbol s, emit_line_ws_markup(o, set, reset, line, len, ' ', flags & (DIFF_SYMBOL_CONTENT_WS_MASK), 0); break; + case DIFF_SYMBOL_CONTEXT_INCOMPLETE: + context = diff_get_color_opt(o, DIFF_CONTEXT); + reset = diff_get_color_opt(o, DIFF_RESET); + emit_line(o, context, reset, line, len); + break; case DIFF_SYMBOL_PLUS: set = diff_get_color_opt(o, DIFF_FILE_NEW); reset = diff_get_color_opt(o, DIFF_RESET); @@ -1448,8 +1454,8 @@ static void fn_out_consume(void *priv, char *line, unsigned long len) default: /* incomplete line at the end */ ecbdata->lno_in_preimage++; - emit_line(o, diff_get_color(ecbdata->color_diff, DIFF_CONTEXT), - reset, line, len); + emit_diff_symbol(o, DIFF_SYMBOL_CONTEXT_INCOMPLETE, + line, len, 0); break; } } -- 2.12.2.575.gb14f27f917