Repository navigation
fix(terminal): preserve wide glyphs when inserting before them - #264
Merged
Merged
Conversation
- Repair truncated or split wide clusters with the current erase fill instead of an unstyled blank, so a right-margin truncation under background-color erase leaves no hole in a colored line. - Cover the colored truncation case and insertion counts that reach or exceed the margin at a wide head.
- Build a headless continuation, a head whose continuation was overwritten, and a head at the margin by hand, so each repair branch runs under a colored pen and the changed lines carry coverage.
johnny4young
marked this pull request as ready for review
October 8, 2026 22:29
johnny4young
added a commit
that referenced
this pull request
Oct 13, 2026
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.
Refresh qualified — 2026-10-08
Source head:
6e047f95100ef2c5187f7c02c7c66d812631caba.Frozen main:
a9796abd92b28e96c283d12c89769a16c57fbf59(through #258).Verified local/uploaded tree:
ee1864e879275622f482ed14af4f665374183ba6.This clean, forward-only merge preserves the previous PR head and all frozen-main changes. The terminal implementation and regression blobs are unchanged. The delta against this base remains four files, 103 additions and one deletion.
make format,make lint,make buildandmake testwere attempted; this Linux executor lacks xcrun/Xcode/XcodeGen. The archive self-test explicitly skips without ditto/unzip.The PR stays draft. No force push, gate changes, merge to main, release or deployment.
Exact tested integration
The source commit has parents
463532cb8a2375d0319640a065f99819bc2386f7and the approved frozen maina9796abd92b28e96c283d12c89769a16c57fbf59. No force push was used, and the terminal implementation/regression blobs are unchanged.All four native checkout logs identify GitHub's synthetic merge
3779fb6fbbcc8ecd111e935882a503812296b2fb, tree5ea2646f3190d16ae29956fd84199db4f770ca51. Its parents are later mainbae70943043a40096f3bff18aabd15a9cfc5a126(including #259) and exact source head6e047f95100ef2c5187f7c02c7c66d812631caba. This is the integration actually exercised by CI; the approved source freeze remains a9796ab.Main subsequently advanced to
9e1bb912508ba6ebb4f120c3c12aab88f18d9991through #260 at 18:42 UTC. The PR is conflict-free but behind that later main. That later integration has not been qualified by this run; no further source refresh is made beyond the agreed freeze. Scoped refresh validation is complete for the source and tested merge pinned above. The PR remains draft for human review; no merge to main, release or deployment occurred.Finding
Inserting cells at a wide CJK/emoji glyph's leading cell erased that complete glyph before shifting the row. For example,
你Z + CSI 1 G + CSI @produced three spaces followed by Z instead of one space followed by 你Z.Change
Only clear the existing wide cluster when insertion starts inside its continuation cell. A complete head/continuation pair shifts together, and the existing right-margin repair still clears truncated pairs. The ordinary insertion fill policy and pen state are unchanged.
Regression coverage
Seven domain tests provide 15 invocations and one rendering test provides two invocations per platform:
Earlier integrations (historical)
Source head:
463532cb8a2375d0319640a065f99819bc2386f7.Then-integrated main:
d97d4e7bb5625003ef286de125f00f99f1706f21.Verified local staged/uploaded tree:
487f1dec6fce0d797fc8b9e0b7df0801b0834f88.Main changed during qualification twice; both integrations use ordinary non-force merge commits:
3bda6abc. Resolve its adjacent production conflict by retaining this PR's continuation-only guard and fix: full app review — editor, menu bar, settings, domain, web/CLI, docs and screenshots #251'serasedCellinsertion fill.d97d4e7b. Its only overlap was the changelog's shared insertion point. Preserve all entries and place this PR's note beside the existing terminal fixes instead.The terminal production and regression file blobs are unchanged from the fully green
c0bc3b73head below. The delta against that historical main remained four files, 103 additions and one deletion. The historical CI qualification below covers that prior combined tree.All 13 then-open PRs were inventoried before publication; #251 was the only terminal-code overlap. The new style regression compares wide and ordinary insertion rather than freezing the pre-BCE fill.
Verification
git diff --check, repository hygiene and changelog/version checks pass after both integrations. Uploaded trees exactly match locally staged trees.make format,make lint,make buildandmake testwere attempted on the final integrated main. Portable lint prerequisites pass; local native formatting/build/tests remain unavailable without xcrun/Xcode/XcodeGen. The archive self-test explicitly skips without ditto/unzip.Fully green earlier integration
CI 37731465913 completed successfully for source
c0bc3b73c199be228bf40d83595beca10e9f46f4, tree6c9cff5734735eab795f68e8884338ebf5204f89, including merged #251. All five jobs passed:This earlier qualification remains a historical record; the latest combined tree is qualified separately below.
Prior exact-head qualification
CI 37739886583 completed successfully on unchanged source
463532cb8a2375d0319640a065f99819bc2386f7, tree487f1dec6fce0d797fc8b9e0b7df0801b0834f88, with both #251 and #254 integrated. All five jobs passed.d97d4e7b, unchanged PR head, a matching local staged/uploaded tree, and no merge conflict.That prior head completed its earlier qualification. The refreshed head is now qualified by the exact-head run and tested merge recorded above. Draft status is preserved; no merge to main, release or deployment.