Fix #6923
This commit is contained in:
parent
b2587c1d54
commit
2a5ba519f5
2 changed files with 2 additions and 2 deletions
|
|
@ -165,7 +165,7 @@ def blank_rects_for_window(wg: WindowGeometry) -> Generator[Rect, None, None]:
|
|||
|
||||
def window_geometry(xstart: int, xnum: int, ystart: int, ynum: int, left: int, top: int, right: int, bottom: int) -> WindowGeometry:
|
||||
return WindowGeometry(
|
||||
left=xstart, top=ystart, xnum=xnum, ynum=ynum,
|
||||
left=xstart, top=ystart, xnum=max(0, xnum), ynum=max(0, ynum),
|
||||
right=xstart + lgd.cell_width * xnum, bottom=ystart + lgd.cell_height * ynum,
|
||||
spaces=Edges(left, top, right, bottom)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -827,7 +827,7 @@ def set_geometry(self, new_geometry: WindowGeometry) -> None:
|
|||
if self.destroyed:
|
||||
return
|
||||
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)
|
||||
self.screen.resize(max(0, new_geometry.ynum), max(0, new_geometry.xnum))
|
||||
self.needs_layout = False
|
||||
call_watchers(weakref.ref(self), 'on_resize', {'old_geometry': self.geometry, 'new_geometry': new_geometry})
|
||||
current_pty_size = (
|
||||
|
|
|
|||
Loading…
Reference in a new issue