Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug]: emojis rendered inside tmux cause first characters of next line to start at end of current line

未关闭
#3,395 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
go
领域
cli, desktop

调研方向

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 内容生成。

描述

bug triage
Current Behavior

Experiment running a temporary tmux server with debug logging returned:
utf8proc_wcwidth(1F451) returned 2

This is a classic multiplexer desync bug:

  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)
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):

  1. Unicode Version: Set to 11 or higher (optimally 15).
  2. East Asian Ambiguous: Toggle the setting to treat ambiguous-width characters as double-width (2 columns).
  3. 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:

  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)

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:

  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)
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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

wavetermdev/waveterm 的其他 Issue

查看 wavetermdev/waveterm 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。