fix: don't attempt to render off the bottom of the screen
This commit is contained in:
parent
01ce0eb472
commit
5a34a7ead7
1 changed files with 2 additions and 1 deletions
|
@ -882,7 +882,8 @@ pub const Editor = struct {
|
|||
ctx.y += 1;
|
||||
ctx.x = 0;
|
||||
ctx.leading = true;
|
||||
n.cursor_move_yx(@intCast(ctx.y), @intCast(ctx.x)) catch {};
|
||||
if (ctx.y >= view.rows) return Buffer.Walker.stop;
|
||||
n.cursor_move_yx(@intCast(ctx.y), @intCast(ctx.x)) catch return Buffer.Walker.stop;
|
||||
}
|
||||
return Buffer.Walker.keep_walking;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue