##// END OF EJS Templates
Add a reset before and after colorized output...
Kevin Christen -
r6856:c6890cfc default
parent child Browse files
Show More
@@ -79,11 +79,12 b' from mercurial.i18n import _'
79
79
80 def render_effects(text, *effects):
80 def render_effects(text, *effects):
81 'Wrap text in commands to turn on each effect.'
81 'Wrap text in commands to turn on each effect.'
82 start = []
82 start = [ str(_effect_params['none'][0]) ]
83 stop = []
83 stop = []
84 for effect in effects:
84 for effect in effects:
85 start.append(str(_effect_params[effect][0]))
85 start.append(str(_effect_params[effect][0]))
86 stop.append(str(_effect_params[effect][1]))
86 stop.append(str(_effect_params[effect][1]))
87 stop.append(str(_effect_params['none'][1]))
87 start = '\033[' + ';'.join(start) + 'm'
88 start = '\033[' + ';'.join(start) + 'm'
88 stop = '\033[' + ';'.join(stop) + 'm'
89 stop = '\033[' + ';'.join(stop) + 'm'
89 return start + text + stop
90 return start + text + stop
General Comments 0
You need to be logged in to leave comments. Login now