shithub: riscv

Download patch

ref: fc36bf0711654fa841750f69615112eb4a047e87
parent: 3fbcc5f4105f6add14d705ba46b684085e7e4e79
author: kvik <[email protected]>
date: Mon Nov 16 14:19:37 EST 2020

diff: fix change marker for -c mode

--- a/sys/src/cmd/diff/diffio.c
+++ b/sys/src/cmd/diff/diffio.c
@@ -392,7 +392,7 @@
 		for(; i<j; i++){
 			fetch(ixold, at, changes[i].a-1, input[0], mode == 'u' ? " " : "  ");
 			fetch(ixold, changes[i].a, changes[i].b, input[0], mode == 'u' ? "-" : "- ");
-			fetch(ixnew, changes[i].c, changes[i].d, input[1], mode == 'u' ? "+" : "- ");
+			fetch(ixnew, changes[i].c, changes[i].d, input[1], mode == 'u' ? "+" : "+ ");
 			at = changes[i].b+1;
 		}
 		fetch(ixold, at, b, input[0], mode == 'u' ? " " : "  ");