File: src/grid.zig:789–792
Severity: MEDIUM
Status: ✅ FIXED — removed @min(cursor_x.?, cells_to_add.len) so cursor maintains its column index even in trailing whitespace. Unit test added.
Cursor logical offset is calculated as current_offset + @min(cursor_x.?, cells_to_add.len). If the cursor is positioned in empty space past written text, @min clamps the column to cells_to_add.len.
Impact: Cursor unexpectedly jumps to the end of written text instead of maintaining its relative column index after window resize.