Browse Source

show: Don't output ESC characters for non-diff show operation

Serj Kalichev 1 year ago
parent
commit
868a57821d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/show.c

+ 1 - 1
src/show.c

@@ -96,7 +96,7 @@ static const char *diff_prefix(enum diff_op op, uint32_t flags)
 
 static const char *diff_suffix(enum diff_op op, uint32_t flags)
 {
-	if (flags & PPARSE_COLORIZE)
+	if ((flags & PPARSE_COLORIZE) && (DIFF_OP_NONE != op))
 		return "\x1b[0m";
 
 	return "";