From c5366491124d138df0d74e98c1282d7e58e159b8 Mon Sep 17 00:00:00 2001 From: "louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13" Date: Thu, 16 Sep 2010 20:19:31 +0000 Subject: fix the shlex fail. Colors are disabled on too long elements --- src/window.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/window.py b/src/window.py index e92fdc5b..162d10f7 100644 --- a/src/window.py +++ b/src/window.py @@ -439,9 +439,11 @@ class TextWin(Win): try: splitted = shlex.split(txt) except ValueError: - from common import debug - debug('SHLEX FAILED on: [%s]\n' % (txt,)) - splitted = 'shlex failed here. See debug'.split() + # FIXME colors are disabled on too long words + txt = txt.replace('"[', '').replace(']"', '')\ + .replace('"{', '').replace('}"', '')\ + .replace('"(', '').replace(')"', '') + splitted = txt.split() for word in splitted: if word in list(special_words.keys()): self.addstr(word, curses.color_pair(special_words[word])) -- cgit v1.2.3