Repository navigation
fix(windows): draw nothing of a partial frame whose areas lie outside the window - #2764
Merged
Merged
Conversation
… the window Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
oneo-me
force-pushed
the
agiox/fix-nsgo-issue-2757
branch
from
November 29, 2026 12:11
8d893b8 to
fd67f85
Compare
oneo-me
marked this pull request as ready for review
November 29, 2026 12:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Windows window panicked with
index out of range [0] with length 0in(*painter).pushAreaswhen a partial frame had no areas to draw: everything it changed lay outside the client area and the frame before changed nothing.pushAreasnow keeps its areas non-nil but empty, so the pass skips the whole tree, and clips to an empty rectangle, so it draws nothing.Fixes #2757.
Targets
core,base,ui,tsx, thensgotool)Only the Windows backend clips a frame to its damaged areas this way.
Screenshots
None
Verification
fd67f8570962ea8987b0c9438e3d5697a3505a43825b87380905c82316a3856e3de8dbce56e25296go tool nsgo check→ 0go tool nsgo check -target windows -jobs 4→ 0go tool nsgo test→ 0passinternal/platform/windowspassedTestPartialFrameWithNoAreasDrawsNothing,TestCanvasArgumentsQueueWhatTheyChangeandTestRedrawAllDrawsTheWholeWindow; the new test panicked as in the issue without the fix.Checklist
fix(linux): keep the caret after a paste; a squash merge uses it as the commit subject.changelog.d/fragment, not inCHANGELOG.md.🤖 Claude Opus 5.5
🤖 Generated with Claude Code