mirror of https://github.com/mum4k/termdash.git
faketerm diff: only print cells with differences.
This commit is contained in:
parent
e4edc8f15a
commit
765556fe8e
|
@ -100,6 +100,9 @@ func Diff(want, got *Terminal) string {
|
|||
for col := 0; col < size.X; col++ {
|
||||
got := got.BackBuffer()[col][row].Rune
|
||||
want := want.BackBuffer()[col][row].Rune
|
||||
if got == want {
|
||||
continue
|
||||
}
|
||||
b.WriteString(fmt.Sprintf(" cell(%v, %v) => got '%c' (rune %d), want '%c' (rune %d)\n", col, row, got, got, want, want))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue