mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
terminal: PageList adjustCap should start from original cap
This commit is contained in:
@ -1561,9 +1561,9 @@ pub fn adjustCapacity(
|
|||||||
page: *List.Node,
|
page: *List.Node,
|
||||||
adjustment: AdjustCapacity,
|
adjustment: AdjustCapacity,
|
||||||
) !*List.Node {
|
) !*List.Node {
|
||||||
// We always use our base capacity which is our standard
|
// We always start with the base capacity of the existing page. This
|
||||||
// adjusted for our column size.
|
// ensures we never shrink from what we need.
|
||||||
var cap = try std_capacity.adjust(.{ .cols = self.cols });
|
var cap = page.data.capacity;
|
||||||
|
|
||||||
// From there, we increase our capacity as required
|
// From there, we increase our capacity as required
|
||||||
if (adjustment.styles) |v| {
|
if (adjustment.styles) |v| {
|
||||||
@ -1571,6 +1571,8 @@ pub fn adjustCapacity(
|
|||||||
cap.styles = @max(cap.styles, aligned);
|
cap.styles = @max(cap.styles, aligned);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.info("adjusting page capacity={}", .{cap});
|
||||||
|
|
||||||
// Create our new page and clone the old page into it.
|
// Create our new page and clone the old page into it.
|
||||||
const new_page = try self.createPage(cap);
|
const new_page = try self.createPage(cap);
|
||||||
errdefer self.destroyPage(new_page);
|
errdefer self.destroyPage(new_page);
|
||||||
|
Reference in New Issue
Block a user