Do not modify if we use ansicolors

This commit is contained in:
Morten Enemark Lund 2016-11-01 18:45:56 +01:00
parent 3545358a4b
commit 5ee9e058ca

View file

@ -452,8 +452,8 @@ class XonshStyle(Style):
if 'CONEMUANSI' not in env:
# Auto suggest needs to be a darker shade to be distinguishable
# from the default color
self.styles[Token.AutoSuggestion] = '#444444'
self._smap.update(expand_gray_colors_for_cmd_exe(self._smap))
if not hasattr(pygments.style, 'ansicolors'):
self.styles[Token.AutoSuggestion] = '#444444'
if env.get('INTENSIFY_COLORS_ON_WIN', False):
has_ansi = hasattr(pygments.style, 'ansicolors')
newcolors = intensify_colors_for_cmd_exe(self._smap, ansi=has_ansi)