mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
renderer: remove alt-screen extend-always
This commit is contained in:
@ -2118,6 +2118,8 @@ fn rebuildCells(
|
||||
// std.log.warn("[rebuildCells time] {}\t{}", .{start_micro, end.since(start) / std.time.ns_per_us});
|
||||
// }
|
||||
|
||||
_ = screen_type; // we might use this again later so not deleting it yet
|
||||
|
||||
// Create an arena for all our temporary allocations while rebuilding
|
||||
var arena = ArenaAllocator.init(self.alloc);
|
||||
defer arena.deinit();
|
||||
@ -2154,12 +2156,9 @@ fn rebuildCells(
|
||||
switch (self.config.padding_color) {
|
||||
.background => {},
|
||||
|
||||
.extend => {
|
||||
self.uniforms.padding_extend.up = screen_type == .alternate;
|
||||
self.uniforms.padding_extend.down = screen_type == .alternate;
|
||||
},
|
||||
|
||||
.@"extend-always" => {
|
||||
// For extension, assume we are extending in all directions.
|
||||
// For "extend" this may be disabled due to heuristics below.
|
||||
.extend, .@"extend-always" => {
|
||||
self.uniforms.padding_extend = .{
|
||||
.up = true,
|
||||
.down = true,
|
||||
@ -2209,9 +2208,9 @@ fn rebuildCells(
|
||||
.background, .@"extend-always" => {},
|
||||
|
||||
// Apply heuristics for padding extension.
|
||||
.extend => if (y == 0 and screen_type == .primary) {
|
||||
.extend => if (y == 0) {
|
||||
self.uniforms.padding_extend.up = !row.neverExtendBg();
|
||||
} else if (y == self.cells.size.rows - 1 and screen_type == .primary) {
|
||||
} else if (y == self.cells.size.rows - 1) {
|
||||
self.uniforms.padding_extend.down = !row.neverExtendBg();
|
||||
},
|
||||
}
|
||||
|
@ -1172,6 +1172,8 @@ pub fn rebuildCells(
|
||||
cursor_style_: ?renderer.CursorStyle,
|
||||
color_palette: *const terminal.color.Palette,
|
||||
) !void {
|
||||
_ = screen_type;
|
||||
|
||||
// Bg cells at most will need space for the visible screen size
|
||||
self.cells_bg.clearRetainingCapacity();
|
||||
self.cells.clearRetainingCapacity();
|
||||
@ -1216,12 +1218,7 @@ pub fn rebuildCells(
|
||||
switch (self.config.padding_color) {
|
||||
.background => {},
|
||||
|
||||
.extend => {
|
||||
self.padding_extend_top = screen_type == .alternate;
|
||||
self.padding_extend_bottom = screen_type == .alternate;
|
||||
},
|
||||
|
||||
.@"extend-always" => {
|
||||
.extend, .@"extend-always" => {
|
||||
self.padding_extend_top = true;
|
||||
self.padding_extend_bottom = true;
|
||||
},
|
||||
@ -1283,9 +1280,9 @@ pub fn rebuildCells(
|
||||
.background, .@"extend-always" => {},
|
||||
|
||||
// Apply heuristics for padding extension.
|
||||
.extend => if (y == 0 and screen_type == .primary) {
|
||||
.extend => if (y == 0) {
|
||||
self.padding_extend_top = !row.neverExtendBg();
|
||||
} else if (y == self.grid_size.rows - 1 and screen_type == .primary) {
|
||||
} else if (y == self.grid_size.rows - 1) {
|
||||
self.padding_extend_bottom = !row.neverExtendBg();
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user