mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Dont dirty the tracker on object creation needlessly
This commit is contained in:
@@ -64,7 +64,7 @@ class Screen(QObject):
|
|||||||
self.tophistorybuf = deque(maxlen=sz)
|
self.tophistorybuf = deque(maxlen=sz)
|
||||||
self.main_linebuf, self.alt_linebuf = list(Line(self.columns) for i in range(self.lines)), list(Line(self.columns) for i in range(self.lines))
|
self.main_linebuf, self.alt_linebuf = list(Line(self.columns) for i in range(self.lines)), list(Line(self.columns) for i in range(self.lines))
|
||||||
self.linebuf = self.main_linebuf
|
self.linebuf = self.main_linebuf
|
||||||
self.reset()
|
self.reset(notify=False)
|
||||||
|
|
||||||
def apply_opts(self, opts):
|
def apply_opts(self, opts):
|
||||||
sz = max(1000, opts.scrollback_lines)
|
sz = max(1000, opts.scrollback_lines)
|
||||||
@@ -95,7 +95,7 @@ class Screen(QObject):
|
|||||||
self.restore_cursor()
|
self.restore_cursor()
|
||||||
self.update_screen()
|
self.update_screen()
|
||||||
|
|
||||||
def reset(self):
|
def reset(self, notify=True):
|
||||||
"""Resets the terminal to its initial state.
|
"""Resets the terminal to its initial state.
|
||||||
|
|
||||||
* Scroll margins are reset to screen boundaries.
|
* Scroll margins are reset to screen boundaries.
|
||||||
@@ -133,7 +133,8 @@ class Screen(QObject):
|
|||||||
self.cursor = Cursor(0, 0)
|
self.cursor = Cursor(0, 0)
|
||||||
self.cursor_changed(self.cursor)
|
self.cursor_changed(self.cursor)
|
||||||
self.cursor_position()
|
self.cursor_position()
|
||||||
self.update_screen()
|
if notify:
|
||||||
|
self.update_screen()
|
||||||
|
|
||||||
def resize(self, lines: int, columns: int):
|
def resize(self, lines: int, columns: int):
|
||||||
"""Resize the screen to the given dimensions.
|
"""Resize the screen to the given dimensions.
|
||||||
|
|||||||
Reference in New Issue
Block a user