Skip to content

Keep overflow text visible when its source cell scrolls out of view - #1672

Merged
aiongg merged 1 commit into
storytold:mainfrom
Silvertree2010:fix/1613-bug-report-gridcraft-visual-bug
Oct 22, 2026
Merged

aiongg merged 1 commit into
storytold:mainfrom
Silvertree2010:fix/1613-bug-report-gridcraft-visual-bug

Conversation

@Silvertree2010

Copy link
Copy Markdown
Contributor

Fixes #1613

Cause

paint_quadrant only laid out text for cells inside the visible column range. When a text cell scrolled off one side, nothing drew its overflow into the visible empty cells next to it, so the whole text disappeared.

Fix

For each visible row, the text pass now also handles the nearest non-empty cell up to 20 columns left and right of the visible range. That cell must be in the same frozen or scrolled pane, visible, and not merged. Its overflow is painted clipped to the quadrant. Merges are now looked up across the same widened range, so overflow coming in from off-screen still stops at merged cells.

Verified

  • Regression tests overflow_text_stays_visible_when_source_cell_scrolls_out_left, right_aligned_overflow_stays_visible_when_source_cell_is_right_of_view, scrolled_overflow_does_not_draw_over_frozen_columns: fail on main without the fix and pass with it (cargo test -p gridcraft-ui-egui --test text_overflow_scroll).
  • cargo xtask ci passes.

Not changed

Backgrounds, borders, sparklines and filter buttons are still painted only for visible cells. The 20-column overflow limit, which already applied to visible cells, is unchanged.

🤖 Generated with Claude Code

Fixes storytold#1613

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aiongg
aiongg merged commit 62c7024 into storytold:main Oct 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] [GridCraft] Visual bug of long text unloading when a cell is unloaded.

2 participants