##// END OF EJS Templates
color: use ui.formatted().
Dan Villiom Podlaski Christiansen -
r11326:c89309fa default
parent child Browse files
Show More
@@ -198,14 +198,10 b' def uisetup(ui):'
198 _effects.update(w32effects)
198 _effects.update(w32effects)
199 elif mode != 'ansi':
199 elif mode != 'ansi':
200 return
200 return
201
202 # check isatty() before anything else changes it (like pager)
203 isatty = sys.__stdout__.isatty()
204
205 def colorcmd(orig, ui_, opts, cmd, cmdfunc):
201 def colorcmd(orig, ui_, opts, cmd, cmdfunc):
206 if (opts['color'] == 'always' or
202 if (opts['color'] == 'always' or
207 (opts['color'] == 'auto' and (os.environ.get('TERM') != 'dumb'
203 (opts['color'] == 'auto' and (os.environ.get('TERM') != 'dumb'
208 and isatty))):
204 and ui_.formatted()))):
209 global _buffers
205 global _buffers
210 _buffers = ui_._buffers
206 _buffers = ui_._buffers
211 extensions.wrapfunction(ui_, 'popbuffer', popbuffer)
207 extensions.wrapfunction(ui_, 'popbuffer', popbuffer)
General Comments 0
You need to be logged in to leave comments. Login now