mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-24 06:04:08 +00:00
When laying out windows in splits shove them offscreen if their widths/heights become too small as too small values will cause crashes
This commit is contained in:
parent
d7dfc85cf7
commit
1870364888
1 changed files with 5 additions and 4 deletions
|
|
@ -1108,8 +1108,8 @@ class Pair:
|
|||
return
|
||||
if self.horizontal:
|
||||
ystart, ynum = next(layout_object.ylayout(1, top=top, height=height))
|
||||
w1 = int(self.bias * width)
|
||||
w2 = width - w1
|
||||
w1 = max(2*cell_width + 1, int(self.bias * width))
|
||||
w2 = max(2*cell_width + 1, width - w1)
|
||||
if isinstance(self.one, Pair):
|
||||
self.one.layout_pair(left, top, w1, height, id_window_map, id_idx_map, layout_object)
|
||||
else:
|
||||
|
|
@ -1124,8 +1124,9 @@ class Pair:
|
|||
self.blank_rects_for_window(layout_object, id_window_map[self.two], left + w1, top, w2, height)
|
||||
else:
|
||||
xstart, xnum = next(layout_object.xlayout(1, left=left, width=width))
|
||||
h1 = int(self.bias * height)
|
||||
h2 = height - h1
|
||||
h1 = max(2*cell_height + 1, int(self.bias * height))
|
||||
h2 = max(2*cell_height + 1, height - h1)
|
||||
|
||||
if isinstance(self.one, Pair):
|
||||
self.one.layout_pair(left, top, width, h1, id_window_map, id_idx_map, layout_object)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue