Fix wide-char (emoji/CJK) column drift through the whole render chain
Wide characters shifted everything after them one column to the right: - render.rs: vt100's empty wide-continuation cell was padded to a space, making wide chars occupy 2+1 columns — skip it entirely - ipc.rs buffer_to_ansi: same bug for daemon frames — skip cells covered by a preceding wide symbol (unicode-width) - app.rs: clamp virtual terminals to >= 2 columns (vt100 0.16 has a subtraction underflow panic on wide chars in a 1-col grid) and give content_area a sane 80x24 default so windows spawned before the first layout pass aren't degenerate - main.rs: use try_send for display frames so one slow/stalled client can no longer freeze the whole WM - integration test: new end-to-end check that emoji do not shift the row, plus fix a false match against the window title Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -172,6 +172,22 @@ def main():
|
||||
text = disp.frame_text(timeout=5.0, contains="x")
|
||||
check("key_event når den virtuella terminalen", "x" in text)
|
||||
|
||||
# ── 4b. Breda tecken (emoji) får inte förskjuta raden ───────────
|
||||
# vt100 lämnar en tom fortsättningscell efter breda tecken; om
|
||||
# renderaren gör den till mellanslag blir "📁X" → "📁 X" och allt
|
||||
# efter emojin skjuts åt höger.
|
||||
# OBS: fönstertiteln visar kommandosträngen (innehåller "X-MARKER"
|
||||
# som text) — vänta därför på emojin+markören som bara finns i
|
||||
# fönstrets INNEHÅLL.
|
||||
app.send({"type": "spawn_window",
|
||||
"command": "printf '\\360\\237\\223\\201X-MARKER\\n'; exec cat",
|
||||
"request_id": "w-emoji"})
|
||||
emoji_open = app.recv_until("window_opened")
|
||||
text = disp.frame_text(timeout=5.0, contains="📁X-MARKER")
|
||||
check("emoji förskjuter inte raden", "📁X-MARKER" in text,
|
||||
f"frame-text: {text[-200:]!r}")
|
||||
app.send({"type": "close_window", "window_id": emoji_open["id"]})
|
||||
|
||||
# ── 5. Popup + popup_result via Enter ───────────────────────────
|
||||
app.send({
|
||||
"type": "spawn_popup", "message": "Integrationstest?",
|
||||
|
||||
Reference in New Issue
Block a user