Use a union for cell attributes

Cleaner code, no performance impact
This commit is contained in:
Kovid Goyal
2021-07-24 11:19:13 +05:30
parent 1e0269faa2
commit 780e526143
9 changed files with 175 additions and 162 deletions

View File

@@ -7,7 +7,7 @@ import tempfile
from kitty.config import build_ansi_color_table, defaults
from kitty.fast_data_types import (
REVERSE, ColorProfile, Cursor as C, HistoryBuf, LineBuf,
ColorProfile, Cursor as C, HistoryBuf, LineBuf,
parse_input_from_terminal, truncate_point_for_length, wcswidth, wcwidth
)
from kitty.rgb import to_color
@@ -51,7 +51,7 @@ class TestDataTypes(BaseTest):
self.ae(new.line(0), old.line(1))
new.clear()
self.ae(str(new.line(0)), '')
old.set_attribute(REVERSE, False)
old.set_attribute('reverse', False)
for y in range(old.ynum):
for x in range(old.xnum):
l0 = old.line(y)