Terminal: measure characters with Unicode 11 widths, so an emoji takes the two columns the remote counts
ci / build and test (push) Successful in 3m37s
ci / android head (push) Successful in 3m45s
ci / api image (push) Successful in 8s
ci / desktop nightly (push) Successful in 1m44s

This commit is contained in:
jaap-jan committed 2026-10-04 13:55:20 +02:00
1 parent ad1a129159
commit 6806e542f9
9 files changed
+136 -6

No files matched your search

+24
View File
@@ -322,6 +322,30 @@ closing the only open window ends the process, so the real window is shown while
Nothing appearing at all means composition is running in the same dispatcher turn that has to paint the
panel, which is what posting it at `DispatcherPriority.Background` prevents.
### 1.13 An emoji takes two columns, and the line after it stays where the shell thinks it is
Open a shell on a Linux host and run:
```
printf '😀|\n12|\n日|\n'
```
**Pass:** the three bars line up in one column. The emoji, the two digits and the CJK character each take two
columns, which is what the remote counted.
Then type `echo 😀😀 hello` at the prompt without pressing Enter, press **←** five times, and type `X`.
**Pass:** the `X` appears between `he` and `llo`, which is where bash put it, and the line does not redraw over
itself.
**What the tests already own.** `RendererUnicodeTests` proves the page loads `@xterm/addon-unicode11` and
selects its table before the pane opens. What is left here is xterm itself drawing to that table.
**Failure means:** the emoji's bar sits one column left of the others, or the `X` lands a column away from the
cursor. The pane is on xterm's default Unicode 6 widths, where an emoji is one column; check that
`terminal.html` still loads `vendor/addon-unicode11.js` and that `AvaloniaTerminalAssetProvider` serves it.
A script the provider does not list is a 404 the page never reports.
---
## Phase 2 — Known Hosts as its own page