mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
when less cols, cursor needs to be in screen space, not viewport
This commit is contained in:
@ -745,7 +745,7 @@ pub fn resize(self: *Screen, alloc: Allocator, rows: usize, cols: usize) !void {
|
||||
cursor_pos.x == i)
|
||||
{
|
||||
assert(new_cursor == null);
|
||||
new_cursor = .{ .x = x, .y = y };
|
||||
new_cursor = .{ .x = x, .y = self.visible_offset + y };
|
||||
}
|
||||
|
||||
// Copy the old cell, unset the old wrap state
|
||||
@ -766,7 +766,7 @@ pub fn resize(self: *Screen, alloc: Allocator, rows: usize, cols: usize) !void {
|
||||
assert(new_cursor == null);
|
||||
new_cursor = .{
|
||||
.x = @minimum(cursor_pos.x, self.cols - 1),
|
||||
.y = y,
|
||||
.y = self.visible_offset + y,
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user