From 09bac3e4a3dfc64c38fd6b0267e0a82864e10b05 Mon Sep 17 00:00:00 2001 From: Orakaro Date: Thu, 21 Nov 2019 18:37:15 +0900 Subject: [PATCH] Using escape for colored raw_input to avoid wrong calculation on readline Still don't know why colors is ignored in Python 3.7.4 --- rainbowstream/rainbow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rainbowstream/rainbow.py b/rainbowstream/rainbow.py index 02bd2a9..c42437b 100644 --- a/rainbowstream/rainbow.py +++ b/rainbowstream/rainbow.py @@ -1493,7 +1493,7 @@ def theme(): # Redefine decorated_name g['decorated_name'] = lambda x: color_func( c['DECORATED_NAME'])( - '[' + x + ']: ') + '[' + x + ']: ', rl=True) printNicely(green('Theme changed.')) except: printNicely(red('No such theme exists.')) @@ -1556,7 +1556,7 @@ def config(): if key == 'THEME': c['THEME'] = reload_theme(value, c['THEME']) g['decorated_name'] = lambda x: color_func( - c['DECORATED_NAME'])('[' + x + ']: ') + c['DECORATED_NAME'])('[' + x + ']: ', rl=True) elif key == 'PREFIX': g['PREFIX'] = u2str(emojize(format_prefix( listname=g['listname'], -- 2.25.1