mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 09:57:15 +01:00
Stop creating range objects in ansiterm
This commit is contained in:
parent
8d8ba52810
commit
d01f7f36e0
@ -210,9 +210,9 @@ else:
|
|||||||
attr = sbinfo.Attributes
|
attr = sbinfo.Attributes
|
||||||
for c in cols:
|
for c in cols:
|
||||||
c = to_int(c, 0)
|
c = to_int(c, 0)
|
||||||
if c in range(30,38): # fgcolor
|
if 29 < c < 38: # fgcolor
|
||||||
attr = (attr & 0xfff0) | self.rgb2bgr(c - 30)
|
attr = (attr & 0xfff0) | self.rgb2bgr(c - 30)
|
||||||
elif c in range(40,48): # bgcolor
|
elif 39 < c < 48: # bgcolor
|
||||||
attr = (attr & 0xff0f) | (self.rgb2bgr(c - 40) << 4)
|
attr = (attr & 0xff0f) | (self.rgb2bgr(c - 40) << 4)
|
||||||
elif c == 0: # reset
|
elif c == 0: # reset
|
||||||
attr = self._orig_sbinfo.Attributes
|
attr = self._orig_sbinfo.Attributes
|
||||||
|
Loading…
Reference in New Issue
Block a user