Skip to content

prompt: fix cursor math for wide characters - #27017

Merged
simonklee merged 1 commit into
devfrom
oc-fix-mention
May 12, 2026
Merged

simonklee merged 1 commit into
devfrom
oc-fix-mention

Conversation

@simonklee

@simonklee simonklee commented May 12, 2026 •

Copy link
Copy Markdown
Member

String.length counts code points, not display columns, so CJK characters and emoji that occupy two terminal cells caused misaligned cursors, broken mention triggers, and incorrect history restoration offsets.

Use Bun.stringWidth for now, we need an alternative for this.

Fix #26716
Close #26922

String.length counts code points, not display columns, so CJK
characters and emoji that occupy two terminal cells caused
misaligned cursors, broken mention triggers, and incorrect
history restoration offsets.

Use Bun.stringWidth for now, we need an alternative for this.

Fix #26716
@simonklee
simonklee merged commit 8f05bbf into dev May 12, 2026
8 of 9 checks passed
@simonklee
simonklee deleted the oc-fix-mention branch May 12, 2026 09:45
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
String.length counts code points, not display columns, so CJK
characters and emoji that occupy two terminal cells caused
misaligned cursors, broken mention triggers, and incorrect
history restoration offsets.

Use Bun.stringWidth for now, we need an alternative for this.

Fix anomalyco#26716
Close anomalyco#26922
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
String.length counts code points, not display columns, so CJK
characters and emoji that occupy two terminal cells caused
misaligned cursors, broken mention triggers, and incorrect
history restoration offsets.

Use Bun.stringWidth for now, we need an alternative for this.

Fix anomalyco#26716
Close anomalyco#26922
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
String.length counts code points, not display columns, so CJK
characters and emoji that occupy two terminal cells caused
misaligned cursors, broken mention triggers, and incorrect
history restoration offsets.

Use Bun.stringWidth for now, we need an alternative for this.

Fix #26716
Close #26922
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.

CJK and other unicode symbols preceeding @ (mention) causes "no matching items"

1 participant