diff options
author | James E. Blair <corvus@gnu.org> | 2018-02-21 09:43:42 -0800 |
---|---|---|
committer | James E. Blair <corvus@gnu.org> | 2018-02-21 09:43:42 -0800 |
commit | 44f7160b9946b01189e81601b73f734182779c51 (patch) | |
tree | 7b8071ae4131dea3e2b3631e3ef71ded1c5801a7 | |
parent | 308a06134d7749638c7ba3afcc4031f31ba09930 (diff) |
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.
-rw-r--r-- | presentty/ansiparser.py | 2 |
1 files changed, 1 insertions, 1 deletions
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): | |||
182 | self.moveTo(0, self.y) | 182 | self.moveTo(0, self.y) |
183 | continue | 183 | continue |
184 | if char == '\n': | 184 | if char == '\n': |
185 | self.moveTo(self.x, self.y+1) | 185 | self.moveTo(0, self.y+1) |
186 | continue | 186 | continue |
187 | if not seq: | 187 | if not seq: |
188 | self.text_lines[self.y][self.x] = char | 188 | self.text_lines[self.y][self.x] = char |