You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In packages/core/src/tests/absolute-positioning.snapshot.test.ts, it adds regression tests covering transparent and zero-sized absolute overlays over text like Hello 中文 world.
In packages/core/src/zig/buffer.zig, it updates overlay preservation logic so underlying double-width characters are treated as valid preserved content, not just width-1 characters.
How did you verify your code works?
Tested locally with bun test packages/core/src/tests/absolute-positioning.snapshot.test.ts --test-name-pattern "Overlay regression".
When a dirty cell belongs to a wide grapheme continuation, redraw the full grapheme from its start cell instead of handling the continuation cell in isolation.
Please see #791 for a different solution. Among other issues it solves the distortion problem around the overlay box edges which are seen in the last screen recording posted here. It's quite tricky because narrow and wide characters can share the same column of cells in the terminal, meaning to keep straight edges on the boxes, you need to reserve a 1-cell perimeter, and apply it on all 4 sides to keep things even. You also have to consider the case where the border attribute is enabled on the box, in which case you can use that as the perimeter instead. Further, you need to detect when the box edges don't touch any wide characters, so you can forego the perimeter when only narrow characters surround the box.
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
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.
Issue for this PR
Closes #837
Type of change
What does this PR do?
How did you verify your code works?
Tested locally with
bun test packages/core/src/tests/absolute-positioning.snapshot.test.ts --test-name-pattern "Overlay regression".Checklist