Merge branch 'master' into zig-0.14

This commit is contained in:
CJ van den Berg 2025-02-11 10:05:14 +01:00
commit 2047190dd1
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
2 changed files with 17 additions and 15 deletions

View file

@ -4518,7 +4518,9 @@ pub const Editor = struct {
return error.InvalidGotoColumnArgument;
const root = self.buf_root() catch return;
const primary = self.get_primary();
try primary.cursor.move_to(root, primary.cursor.row, @intCast(if (column < 1) 0 else column - 1), self.metrics);
column = if (column < 1) 0 else column - 1;
column = try root.pos_to_width(primary.cursor.row, column, self.metrics);
try primary.cursor.move_to(root, primary.cursor.row, column, self.metrics);
self.clamp();
}
pub const goto_column_meta: Meta = .{ .arguments = &.{.integer} };