mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Nicer window resize behavior when running a shell with a right side prompt
This commit is contained in:
@@ -65,6 +65,10 @@ class Window:
|
||||
def set_geometry(self, new_geometry):
|
||||
if self.needs_layout or new_geometry.xnum != self.screen.columns or new_geometry.ynum != self.screen.lines:
|
||||
self.screen.resize(new_geometry.ynum, new_geometry.xnum)
|
||||
if self.screen.cursor.y > 0:
|
||||
# We move the cursor once line down to prevent the shell from
|
||||
# overwriting the contents of the last line
|
||||
self.screen.index()
|
||||
self.child.resize_pty(self.screen.columns, self.screen.lines)
|
||||
self.char_grid.resize(new_geometry)
|
||||
self.needs_layout = False
|
||||
|
||||
Reference in New Issue
Block a user