FIX: fixed same font in sequence not working

master 3.7.2.4
idziubenko 2 years ago
parent 212d69a4e9
commit 239a3c7bc0

@ -294,9 +294,15 @@ class ColorTerminalOutput(SaveAttrOutput):
def handleColor(self, prevstate, curstate, attrs, tail_attrs):
"""Обработать изменение цветов (фон и/или тон)"""
if prevstate.foreground != curstate.foreground:
# if prevstate.foreground != curstate.foreground:
# self.handleForeground(prevstate, curstate, attrs, tail_attrs)
if prevstate.foreground != curstate.foreground or \
curstate.foreground is not None and prevstate.foreground == curstate.foreground:
self.handleForeground(prevstate, curstate, attrs, tail_attrs)
if prevstate.background != curstate.background:
# if prevstate.background != curstate.background:
# self.handleBackground(prevstate, curstate, attrs, tail_attrs)
if prevstate.background != curstate.background or \
curstate.background is not None and prevstate.background == curstate.background:
self.handleBackground(prevstate, curstate, attrs, tail_attrs)
def _createAttrs(self, prevstate, curstate):
@ -320,9 +326,9 @@ class ColorTerminalOutput(SaveAttrOutput):
self.handleUnderline(prevstate, curstate, attrs, tail_attrs)
if prevstate.invert != curstate.invert:
self.handleInvert(prevstate, curstate, attrs, tail_attrs)
if (prevstate.foreground != curstate.foreground or
prevstate.background != curstate.background):
self.handleColor(prevstate, curstate, attrs, tail_attrs)
# if (prevstate.foreground != curstate.foreground or
# prevstate.background != curstate.background):
self.handleColor(prevstate, curstate, attrs, tail_attrs)
return attrs, tail_attrs
def _createEscCode(self, attrs):

Loading…
Cancel
Save