[Bug]: emojis rendered inside tmux cause first characters of next line to start at end of current line
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 22.3k
- Fork
- 1.1k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của wavetermdev/waveterm
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
wavetermdev/waveterm#3481 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
wavetermdev/waveterm#3435 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
wavetermdev/waveterm#3432 ·
-
enhancement triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
wavetermdev/waveterm#3431 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
wavetermdev/waveterm#3428 ·
Tất cả issue của wavetermdev/waveterm
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
crossplane/crossplane#7859 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bazel-contrib/rules_go#4721 · 2 bình luận ·
-
needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
bug carvel-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
carvel-dev/kapp-controller#1861 ·
-
area/logging kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100