fix: collapse orphaned wide-char lead on trailing-column overlay#86
Open
natemoo-re wants to merge 3 commits into
Open
fix: collapse orphaned wide-char lead on trailing-column overlay#86natemoo-re wants to merge 3 commits into
natemoo-re wants to merge 3 commits into
Conversation
commit: |
When a narrow glyph is floated onto the trailing column of an already-placed wide char, the present loops skipped the trailing column and the overlay was dropped (the wide char painted over both cells). Detect the partial overwrite (non-space trailing cell) and collapse the orphaned lead to a space at width 1 so the overlay glyph emits. Applied symmetrically to present_cups and present_lines; rows without overlapping writes stay byte-for-byte identical. Fixes #75
b2240c3 to
7ebeb93
Compare
Contributor
Merging this PR will degrade performance by 54.46%
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing |
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.
present_cupsandpresent_linesnow detect a partial overwrite (a wide char whose trailing back-buffer cell holds a non-space glyph), collapse the orphaned lead to a space at width 1, and let the overlay glyph emit on the next columntest/width.test.tsunderdescribe("wide characters")rather than a standalone file. fix: cluster base + U+FE0F as a width-2 emoji glyph #84 also adds totest/width.test.ts(describe("emoji width")), so whichever merges second needs a trivial rebase to keep both describesdeno testgreen (8 passed);deno lint+deno fmt --checkclean