##// END OF EJS Templates
color: only provide the required opt to _modesetup
Simon Heimberg -
r19297:8ddc3cd9 default
parent child Browse files
Show More
@@ -159,10 +159,9 b' def _terminfosetup(ui, mode):'
159 "ECMA-48 color\n"))
159 "ECMA-48 color\n"))
160 _terminfo_params = {}
160 _terminfo_params = {}
161
161
162 def _modesetup(ui, opts):
162 def _modesetup(ui, coloropt):
163 global _terminfo_params
163 global _terminfo_params
164
164
165 coloropt = opts['color']
166 auto = coloropt == 'auto'
165 auto = coloropt == 'auto'
167 always = not auto and util.parsebool(coloropt)
166 always = not auto and util.parsebool(coloropt)
168 if not always and not auto:
167 if not always and not auto:
@@ -405,7 +404,7 b' def uisetup(ui):'
405 colorui.__bases__ = (ui.__class__,)
404 colorui.__bases__ = (ui.__class__,)
406 ui.__class__ = colorui
405 ui.__class__ = colorui
407 def colorcmd(orig, ui_, opts, cmd, cmdfunc):
406 def colorcmd(orig, ui_, opts, cmd, cmdfunc):
408 mode = _modesetup(ui_, opts)
407 mode = _modesetup(ui_, opts['color'])
409 colorui._colormode = mode
408 colorui._colormode = mode
410 if mode:
409 if mode:
411 extstyles()
410 extstyles()
General Comments 0
You need to be logged in to leave comments. Login now