Repository navigation
Conversation
A picture that has scrolled out of the screen is history, but deleting its placement or its image data reached back through every physical line and detached it from the scrollback too. A mux client that had already painted some of those rows kept them, while rows it refetched came back without the picture, so scrolling back showed the image torn into bands (or gone). Rows above the visible area now keep the ImageCell with its pixels and texture coordinates, stripped of its kitty identity: the history still paints, a client can fetch it by cell, and a later reuse of the image id cannot rewrite it. Deletion on the visible screen is unchanged.
Contributor
Author
|
Scope note after further testing: this PR fixes the reproducible image history loss — a program deleting an image (kitty |
This branch has not been deployed
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 kitty picture that has scrolled into the scrollback is history. Deleting its placement or its image data used to reach back through every physical line and detach it from the scrollback too. A mux client that had already painted some of those rows kept them, while rows it refetched came back without the picture, so scrolling back showed the image torn into bands or gone.
This keeps the pixels on scrollback rows and strips their kitty identity instead (
ImageCell::as_history()): history still paints, a client can fetch it by cell through the existingGetImageCellpath, and a later reuse of the image id cannot rewrite it. Deletion on the visible screen is unchanged.Part of #29. This fixes the history-loss half; the fast-output viewport half is #34.
Validation
cargo test -p wezterm-cell -p wezterm-term --lib— 18 + 203 passed.deleting_an_image_leaves_its_scrollback_history_painteddeleting_a_visible_image_still_takes_it_off_the_screenkitty_delete_all_preserves_scrollback_inactive_screen_and_unplaced_datafor the new history cells.a=d,d=I, print 1000 lines, scroll back. 0.4.9 shows a blank block; with this branch the picture is intact.Evidence (screenshots, logs, repro scripts):
I did not run the full
cargo test --workspace; the focused suites above andcargo checkfor the affected crates pass.Third-party material
None. All code is my own; the test pattern is generated by ImageMagick.
Contributor agreement
I agree to the ThinkTerm Contributor Agreement version 1.2 for this contribution, including the permission for a future MIT release and the patent license, and confirm I am authorized to make these grants.