Repository navigation
Conversation
drawPoint/drawLine returned on an off-canvas endpoint before the commit, so a stroke released outside the image (or ended by a shift line with an off-canvas end) never became an undo step; the next press cleared its buffer and the pixels were left behind by undo-all. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
foxnne
marked this pull request as ready for review
October 23, 2026 14:24
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.
Part of fizzyedit/work#84 (symptom 1: undo to "Before any change" leaves pixels). Data bug, not display.
File.drawPoint/File.drawLinereturn early when a point is off the canvas, before theto_changecommit. A pen released outside the image (or a shift line ending outside) therefore never became an undo step: the pixels were painted and sit in the stroke buffer / snapshot, then the next press clears both (processStrokepress:buffers.stroke.clearAndFree()+strokeUndoBegin). Undo-all can never remove them.Fix: the off-canvas early return commits the stroke in progress (only when there is one, so a stray click makes no empty step).
Checked and ruled out: the snapshot box covers the brush (brushRect/lineBrushCoverRect match
Brush.shapeOffor the tool's stroke_size, expanded before each draw), and the box is never narrower than a fast segment. Overlapping undo/redo is symmetric (applyChangeswaps). Independent of #68/#69: neither touches these early returns (the bug is on main and with both applied).No headless test:
Fileneeds the host runtime (runtime.state()), and pixi'szig build testis std-only files. Verified byzig buildand by reading; reproduction: draw a stroke, release the pen outside the image, press again elsewhere, undo twice: the first stroke stays.🤖 Generated with Claude Code