mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-22 21:23:44 +00:00
Nicer window resize behavior when running a shell with a right side prompt
This commit is contained in:
parent
e3ba45d903
commit
431322a263
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue