diff options
Diffstat (limited to 'poezio/windows/text_win.py')
-rw-r--r-- | poezio/windows/text_win.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/poezio/windows/text_win.py b/poezio/windows/text_win.py index 76c7d2d7..d0669b26 100644 --- a/poezio/windows/text_win.py +++ b/poezio/windows/text_win.py @@ -32,6 +32,9 @@ class Line: class BaseTextWin(Win): + __slots__ = ('lines_nb_limit', 'pos', 'built_lines', 'lock', 'lock_buffer', + 'separator_after') + def __init__(self, lines_nb_limit: Optional[int] = None) -> None: if lines_nb_limit is None: lines_nb_limit = config.get('max_lines_in_memory') @@ -175,6 +178,8 @@ class BaseTextWin(Win): class TextWin(BaseTextWin): + __slots__ = ('highlights', 'hl_pos', 'nb_of_highlights_after_separator') + def __init__(self, lines_nb_limit: Optional[int] = None) -> None: BaseTextWin.__init__(self, lines_nb_limit) @@ -190,8 +195,6 @@ class TextWin(BaseTextWin): # This is useful to make “go to next highlight“ work after a “move to separator”. self.nb_of_highlights_after_separator = 0 - self.separator_after = None - def next_highlight(self) -> None: """ Go to the next highlight in the buffer. @@ -563,6 +566,8 @@ class TextWin(BaseTextWin): class XMLTextWin(BaseTextWin): + __slots__ = () + def __init__(self) -> None: BaseTextWin.__init__(self) |