#906·bubbles

textinput: Cursor() 为宽 (CJK) 字符返回不正确的 X 位置

作者: 708u创建于 2026年3月14日更新于 2026年8月15日

Describe the bug

textinput.Model.Cursor() computes the Cursor X offset using m.Position(), which returns a rune index. For wide characters (CJK, fullwidth, etc.) that occupy 2 terminal columns, this results in the Cursor being placed at the wrong screen position.

内容来源: charmbracelet/bubbles