diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-09-16 20:19:31 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-09-16 20:19:31 +0000 |
commit | c5366491124d138df0d74e98c1282d7e58e159b8 (patch) | |
tree | d26eb7abc903f92563bc8aed18a4bb7af98b37a0 /src | |
parent | f638427afc92dda86452e563524d5528fee2b344 (diff) | |
download | poezio-c5366491124d138df0d74e98c1282d7e58e159b8.tar.gz poezio-c5366491124d138df0d74e98c1282d7e58e159b8.tar.bz2 poezio-c5366491124d138df0d74e98c1282d7e58e159b8.tar.xz poezio-c5366491124d138df0d74e98c1282d7e58e159b8.zip |
fix the shlex fail. Colors are disabled on too long elements
Diffstat (limited to 'src')
-rw-r--r-- | src/window.py | 8 |
1 files 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])) |