From 44f7160b9946b01189e81601b73f734182779c51 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 21 Feb 2018 09:43:42 -0800 Subject: Handle LF-only ansi art Most ansi-art has CRLF, but in case we get input with only LF, treat LF as "move to beginning of next line". That's partially redundant with CR, which is "move to beginning of current line", but I haven't seen any ansi art which uses LF to only mean "move to this position on next line", so the new interpretation should be safe and work for both examples seen. --- presentty/ansiparser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presentty/ansiparser.py b/presentty/ansiparser.py index 4750b9e..69b408d 100644 --- a/presentty/ansiparser.py +++ b/presentty/ansiparser.py @@ -182,7 +182,7 @@ class ANSIParser(object): self.moveTo(0, self.y) continue if char == '\n': - self.moveTo(self.x, self.y+1) + self.moveTo(0, self.y+1) continue if not seq: self.text_lines[self.y][self.x] = char -- cgit v1.2.3