Skip to content

Cap grapheme final width at 2 (foot, ghostty, terminal.exe) - #224

Merged
jquast merged 9 commits into
masterfrom
jq/grapheme-width-cap-2
Jun 5, 2026
Merged

Cap grapheme final width at 2 (foot, ghostty, terminal.exe)#224
jquast merged 9 commits into
masterfrom
jq/grapheme-width-cap-2

Conversation

@jquast

@jquast jquast commented Jun 5, 2026

Copy link
Copy Markdown
Owner

From, ghostty-org/ghostty#10465 (comment)

ghostty, foot, and windows terminal all clip all final grapheme widths to 2 cells for cursor advance.

Even though they "spill" out and over adjacent cells, the measurement of cursor advance is limited to 2 by their engines.

ghostty (2):
image

foot (2):
image

@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (c7fc868) to head (b002a6b).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #224   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         1513      1566   +53     
  Branches       364       388   +24     
=========================================
+ Hits          1513      1566   +53     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

From, ghostty-org/ghostty#10465 (comment)

ghostty, foot, and windows terminal all "cap" the final grapheme width
to 2 cells for cursor advance. Even if sometimes they "spill out" and
over adjacent cells, the measurement of cursor advance is limited to 2.

<img width="800" height="228" alt="image" src="https://github.com/user-attachments/assets/00821b21-97c0-4a69-a196-a6fe2a8c548d" />

<img width="1024" height="159" alt="image" src="https://github.com/user-attachments/assets/a6106e6c-5519-4498-9a7d-fa28dc256787" />
@jquast
jquast force-pushed the jq/grapheme-width-cap-2 branch from c4b0aa3 to 05d94bd Compare June 5, 2026 04:21
@codspeed-hq

codspeed-hq Bot commented Jun 5, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 88 untouched benchmarks


Comparing jq/grapheme-width-cap-2 (b002a6b) with master (c7fc868)

Open in CodSpeed

@jquast
jquast merged commit 99e538b into master Jun 5, 2026
29 checks passed
@jquast
jquast deleted the jq/grapheme-width-cap-2 branch June 5, 2026 05:17
jquast added a commit that referenced this pull request Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant