Fix the scoping of "diff" so its value doesn't leak between loop iterations
In the existing code, "diff" has function scope and the value from the previous iteration may be used if it is not reset. This appears to be an oversight. This commit changes its scope to the for loop body. One confusing point is that the cursor movement escape sequences appear to be necessary even if the requested movement is 0. I haven't been able to figure out why this makes a difference. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
A
Aaron Lehmann committed
59df2adc071e0186ccd0ba7ea9387142e168d735
Parent: fc41d39