Description
When multiline pasted text is summarized in the TUI as [Pasted ~N lines], submitting the prompt can corrupt the final text if there are wide characters such as Korean text before the pasted token.
Plugins
No response
OpenCode version
1.3.13
Steps to reproduce
-
In an empty prompt, type or paste:
테스트
-
Copy the following multiline text and paste it into the prompt:
2. 테스트 A
This can be reproduced in two ways:
- Copying text by dragging inside OpenCode until Copied to clipboard appears
- Copying the same text from outside OpenCode and pasting it into the prompt
-
Submit the prompt.
Expected behavior
The full submitted prompt should be:
테스트 2. 테스트 A
Actual behavior
The prompt is reconstructed incorrectly and ends up looking like this:
테스트[Pa2. 테스트 A
Notes
This is not limited to text copied by dragging inside OpenCode. The same issue also happens when the multiline text is copied from an external source and pasted into the prompt.
Screenshot and/or share link
No response
Operating System
Mac OS Sonoma 14.6.1
Terminal
zsh
Description
When multiline pasted text is summarized in the TUI as
[Pasted ~N lines], submitting the prompt can corrupt the final text if there are wide characters such as Korean text before the pasted token.Plugins
No response
OpenCode version
1.3.13
Steps to reproduce
In an empty prompt, type or paste:
테스트
Copy the following multiline text and paste it into the prompt:
2. 테스트 A
This can be reproduced in two ways:
Submit the prompt.
Expected behavior
The full submitted prompt should be:
테스트 2. 테스트 A
Actual behavior
The prompt is reconstructed incorrectly and ends up looking like this:
테스트[Pa2. 테스트 A
Notes
This is not limited to text copied by dragging inside OpenCode. The same issue also happens when the multiline text is copied from an external source and pasted into the prompt.
Screenshot and/or share link
No response
Operating System
Mac OS Sonoma 14.6.1
Terminal
zsh