mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
fix y pos on resize
This commit is contained in:
@ -849,7 +849,7 @@ pub fn resizeWithoutReflow(self: *Screen, rows: usize, cols: usize) !void {
|
|||||||
// the same scrollback.
|
// the same scrollback.
|
||||||
const old_cursor_y_screen = RowIndexTag.active.index(old.cursor.y).toScreen(&old).screen;
|
const old_cursor_y_screen = RowIndexTag.active.index(old.cursor.y).toScreen(&old).screen;
|
||||||
self.cursor.x = @minimum(old.cursor.x, self.cols - 1);
|
self.cursor.x = @minimum(old.cursor.x, self.cols - 1);
|
||||||
self.cursor.y = if (old_cursor_y_screen < RowIndexTag.screen.maxLen(self))
|
self.cursor.y = if (old_cursor_y_screen <= RowIndexTag.screen.maxLen(self))
|
||||||
old_cursor_y_screen - self.history
|
old_cursor_y_screen - self.history
|
||||||
else
|
else
|
||||||
self.rows - 1;
|
self.rows - 1;
|
||||||
|
Reference in New Issue
Block a user