mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
fix: memory corruption in Screen.cursorScrollAboveRotate
Unless it's guaranteed that the new pin is in the same page as the old one, `cursor.page_pin` should only be updated through `cursorChangePin`, not directly.
This commit is contained in:
@ -863,7 +863,7 @@ pub fn cursorScrollAbove(self: *Screen) !void {
|
||||
}
|
||||
|
||||
fn cursorScrollAboveRotate(self: *Screen) !void {
|
||||
self.cursor.page_pin.* = self.cursor.page_pin.down(1).?;
|
||||
self.cursorChangePin(self.cursor.page_pin.down(1).?);
|
||||
|
||||
// Go through each of the pages following our pin, shift all rows
|
||||
// down by one, and copy the last row of the previous page.
|
||||
|
Reference in New Issue
Block a user