Skip to content

fix(textinput): use display width for cursor X offset#979

Open
leno23 wants to merge 2 commits into
charmbracelet:mainfrom
leno23:fix/textinput-cursor-wide-chars-906
Open

fix(textinput): use display width for cursor X offset#979
leno23 wants to merge 2 commits into
charmbracelet:mainfrom
leno23:fix/textinput-cursor-wide-chars-906

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

Fixes #906.

The bubbletea cursor X position now uses terminal display width for wide runes.

Test plan

  • go test ./textinput/... -run TestCursorWideCharacterOffset -v

Made with Cursor

leno23 and others added 2 commits May 17, 2026 18:56
Fixes charmbracelet/gum#236.

Resolve symlink targets when deciding if an entry is a directory so
symlinks to folders can be opened instead of being selected as files.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fixes charmbracelet#906.

Compute bubbletea cursor X using uniseg string width so wide characters
such as CJK glyphs position the cursor correctly.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

textinput: Cursor() returns incorrect X position for wide (CJK) characters

1 participant