mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
Micro-optimization
This commit is contained in:
@@ -462,7 +462,10 @@ class Screen(QObject):
|
|||||||
self.tophistorybuf.append(l)
|
self.tophistorybuf.append(l)
|
||||||
self.line_added_to_history()
|
self.line_added_to_history()
|
||||||
self.linebuf.insert(bottom, Line(self.columns))
|
self.linebuf.insert(bottom, Line(self.columns))
|
||||||
self.update_screen()
|
if bottom - top >= self.lines - 1:
|
||||||
|
self.update_screen()
|
||||||
|
else:
|
||||||
|
self.update_line_range(top, bottom)
|
||||||
else:
|
else:
|
||||||
self.cursor_down()
|
self.cursor_down()
|
||||||
|
|
||||||
@@ -475,7 +478,10 @@ class Screen(QObject):
|
|||||||
if self.cursor.y == top:
|
if self.cursor.y == top:
|
||||||
self.linebuf.pop(bottom)
|
self.linebuf.pop(bottom)
|
||||||
self.linebuf.insert(top, Line(self.columns))
|
self.linebuf.insert(top, Line(self.columns))
|
||||||
self.update_screen()
|
if bottom - top >= self.lines - 1:
|
||||||
|
self.update_screen()
|
||||||
|
else:
|
||||||
|
self.update_line_range(top, bottom)
|
||||||
else:
|
else:
|
||||||
self.cursor_up()
|
self.cursor_up()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user