Merge pull request #4187 from ijc25/pull-urxvt-corruption

progress_stream: Avoid undefined ANSI escape codes
This commit is contained in:
Joffrey F 2016-12-02 13:54:08 -08:00 committed by GitHub
commit 9bfb855b89
1 changed files with 3 additions and 4 deletions

View File

@ -32,12 +32,11 @@ def stream_output(output, stream):
if not image_id:
continue
if image_id in lines:
diff = len(lines) - lines[image_id]
else:
if image_id not in lines:
lines[image_id] = len(lines)
stream.write("\n")
diff = 0
diff = len(lines) - lines[image_id]
# move cursor up `diff` rows
stream.write("%c[%dA" % (27, diff))