[Bug]: emojis rendered inside tmux cause first characters of next line to start at end of current line
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by reproducing the emoji-width mismatch on Windows with tmux and the pi TUI, using the !printf example in the issue. Inspect WaveTerm's layout and width engine to find where the crown emoji is treated as one column. Done means text no longer overlaps or wraps incorrectly in tmux while preserving correct rendering outside tmux.
由索引模型根据 Issue 内容生成。
描述
Current Behavior
Experiment running a temporary tmux server with debug logging returned:
utf8proc_wcwidth(1F451) returned 2
This is a classic multiplexer desync bug:
- Tmux thinks 👑 is 2 columns wide. (Correct)
- Pi TUI thinks 👑 is 2 columns wide. (Correct)
- WaveTerm's layout/width engine thinks 👑 is 1 column wide, but its font renders the glyph across 2 columns
anyway. (Incorrect)
Why this causes chaos:
- Directly outside tmux: There is no multiplexer virtual grid to sync. Node.js outputs sequential bytes,
WaveTerm places them next to each other, and you only see a minor, imperceptible 1-column layout shift (like a
box border being slightly short). No overlap, looks fine. - Inside tmux: Tmux maintains a strict virtual grid buffer and optimizes redraws. Because WaveTerm's width
engine and tmux's width engine disagree, tmux's optimized cursor updates place characters directly on top of
the second half of the emoji glyph, causing overlapping text and chaotic wrapped lines!
────────────────────────────────────────────────────────────────────────────────
How to Fix (WaveTerm Settings on your Host):
Open WaveTerm's settings tab (Cmd + , or Ctrl + , or click the gear icon):
- Unicode Version: Set to 11 or higher (optimally 15).
- East Asian Ambiguous: Toggle the setting to treat ambiguous-width characters as double-width (2 columns).
- Font: Ensure you're using a strictly monospaced font with correct emoji width support (e.g., JetBrains Mono,
Fira Code, Hack, or SF Mono).
Expected Behavior
print the following using !printf to the pi TUI while in tmux:
- Tmux thinks 👑 is 2 columns wide. (Correct)
- Pi TUI thinks 👑 is 2 columns wide. (Correct)
- WaveTerm's layout/width engine thinks 👑 is 1 column wide, but its font renders the glyph across 2 columns
anyway. (Incorrect)
It will render as:
print the following using !printf to the pi TUI while in tmux:
1. Tmux thinks 👑 is 2 columns wide. (Correct)
2. Pi TUI thinks 👑 is 2 columns wide. (Correct) 3
. WaveTerm's layout/width engine thinks 👑 is 1 column wide, but its font renders the glyph across 2 columns
anyway. (Incorrect)
Steps To Reproduce
print the following using !printf to the pi TUI while in tmux:
- Tmux thinks 👑 is 2 columns wide. (Correct)
- Pi TUI thinks 👑 is 2 columns wide. (Correct)
- WaveTerm's layout/width engine thinks 👑 is 1 column wide, but its font renders the glyph across 2 columns
anyway. (Incorrect)
Wave Version
v0.14.5
Platform
Windows
OS Version/Distribution
Win 11
Architecture
x64
Anything else?
I am ssh'd from Windows Powershell terminal widget into a VPS running Ubuntu. Then run tmux, then run pi coding agent within tmux.
But I think you can repo without pi
- 主要语言
- Go
- 星标
- 22.4k
- 派生
- 1.2k
- 平均合并
- 3 天 13 小时
- 30 天内合并 PR
- 14
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wavetermdev/waveterm 的其他 Issue
-
pwsh: encodeEnvVarsForPowerShell rejects Windows-standard env var names like ProgramFiles(x86), breaking wsh token on every pwsh block可能已有人在做 @vortsghost2025 于 31 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
wavetermdev/waveterm#3481 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
wavetermdev/waveterm#3435 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
wavetermdev/waveterm#3432 ·
维护者通常 1 天内回复
-
enhancement triage
难度 2/5 1-3 小时 新手友好度 82/100
wavetermdev/waveterm#3431 ·
维护者通常 1 天内回复
-
[Bug]: web blocks become unresponsive when switching focus between two of them可能已有人在做 @jameswolensky 于 89 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
wavetermdev/waveterm#3428 ·
维护者通常 1 天内回复
查看 wavetermdev/waveterm 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
bug good first issue load-balancing
难度 2/5 1-3 小时 新手友好度 82/100
ktrubilo9/edge-proxy#53 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug needs triage receiver/dockerstats
难度 2/5 1-3 小时 新手友好度 85/100
open-telemetry/opentelemetry-collector-contrib#51948 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
LanternOps/breeze#8353 ·
维护者通常 1 天内回复