mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
terminal: only reload style if we're on a new page on scroll
This commit is contained in:
@ -527,12 +527,14 @@ pub fn cursorDownScroll(self: *Screen) !void {
|
||||
}
|
||||
|
||||
if (self.cursor.style_id != style.default_id) {
|
||||
// We need to ensure our new page has our style.
|
||||
self.manualStyleUpdate() catch |err| {
|
||||
// We need to ensure our new page has our style. This is a somewhat
|
||||
// expensive operation so we only do it if our page pin y is on zero,
|
||||
// which signals we're at the top of a page.
|
||||
if (self.cursor.page_pin.y == 0) {
|
||||
// This should never happen because if we're in a new
|
||||
// page then we should have space for one style.
|
||||
log.warn("error updating style on scroll err={}", .{err});
|
||||
};
|
||||
try self.manualStyleUpdate();
|
||||
}
|
||||
|
||||
// The newly created line needs to be styled according to
|
||||
// the bg color if it is set.
|
||||
|
Reference in New Issue
Block a user