From 9cac7eb77745afce21851a3f031bb6e41f98bfa5 Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 3 Oct 2012 16:31:07 +0200 Subject: gui.ansi: Fix crash https://savannah.nongnu.org/bugs/?37346 --- ranger/gui/ansi.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit 1.4.1-2-gfad0