diff options
author | hut <hut@lavabit.com> | 2012-10-03 16:31:07 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2012-10-03 16:31:07 +0200 |
commit | 9cac7eb77745afce21851a3f031bb6e41f98bfa5 (patch) | |
tree | 85b57b3f529f15ea9e31e8f463d14ec6d89fb0ac | |
parent | ffd0a1a81a849577efc18747fc8aacad192a6fbb (diff) | |
download | ranger-9cac7eb77745afce21851a3f031bb6e41f98bfa5.tar.gz |
gui.ansi: Fix crash https://savannah.nongnu.org/bugs/?37346
-rw-r--r-- | ranger/gui/ansi.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/gui/ansi.py b/ranger/gui/ansi.py index 96b95669..f328d9df 100644 --- a/ranger/gui/ansi.py +++ b/ranger/gui/ansi.py @@ -21,6 +21,9 @@ def text_with_fg_bg_attr(ansi_text): if chunk[-1] != 'm': continue match = re.match(r'^.\[(.*).$', chunk) + if not match: + # XXX I have no test case to determine what should happen here + continue attr_args = match.group(1) fg, bg, attr = -1, -1, 0 |