diff --git a/src/tui/editor.zig b/src/tui/editor.zig index a89c603..ba15cb3 100644 --- a/src/tui/editor.zig +++ b/src/tui/editor.zig @@ -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 = .{ .arguments = &.{.integer} };