Show More
@@ -198,10 +198,14 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 | ||||
201 | def colorcmd(orig, ui_, opts, cmd, cmdfunc): |
|
205 | def colorcmd(orig, ui_, opts, cmd, cmdfunc): | |
202 | if (opts['color'] == 'always' or |
|
206 | if (opts['color'] == 'always' or | |
203 | (opts['color'] == 'auto' and (os.environ.get('TERM') != 'dumb' |
|
207 | (opts['color'] == 'auto' and (os.environ.get('TERM') != 'dumb' | |
204 |
and |
|
208 | and isatty))): | |
205 | global _buffers |
|
209 | global _buffers | |
206 | _buffers = ui_._buffers |
|
210 | _buffers = ui_._buffers | |
207 | extensions.wrapfunction(ui_, 'popbuffer', popbuffer) |
|
211 | extensions.wrapfunction(ui_, 'popbuffer', popbuffer) |
General Comments 0
You need to be logged in to leave comments.
Login now