Description
When pasting a large block of text (e.g., 130+ lines) into the terminal input area, OpenCode displays a preview indicator [Pasted ~N lines] to show the number of lines being pasted. However, when pressing Enter to submit the input, this preview indicator is incorrectly included as part of the actual content being sent.
Actual behavior:
The submitted content includes the UI placeholder:
[Pasted ~130 lines] xxxline1
line2
line3
...
Expected behavior:
The submitted content should only contain the actual pasted text without the preview indicator:
Root cause:
The [Pasted ~N lines] placeholder appears to be added to the input buffer instead of being rendered purely as a visual overlay in the UI layer. This causes the preview text to be treated as user input.
Impact:
- Commands or code blocks are prefixed with unexpected text
- May cause command execution failures or syntax errors
- Affects all paste operations exceeding the line threshold
Plugins
None
OpenCode version
1.1.42
Steps to reproduce
- Copy a text block containing more than ~130 lines (or whatever threshold triggers the preview)
- Paste the content into the OpenCode terminal input area
- Observe the preview indicator:
[Pasted ~130 lines] appears
- Press Enter to submit the input
- Check the actual content sent - the preview indicator is incorrectly included
Screenshot and/or share link
No response
Operating System
MacOS 15.7.3
Terminal
ITerm2
Description
When pasting a large block of text (e.g., 130+ lines) into the terminal input area, OpenCode displays a preview indicator
[Pasted ~N lines]to show the number of lines being pasted. However, when pressing Enter to submit the input, this preview indicator is incorrectly included as part of the actual content being sent.Actual behavior:
The submitted content includes the UI placeholder:
Expected behavior:
The submitted content should only contain the actual pasted text without the preview indicator:
Root cause:
The
[Pasted ~N lines]placeholder appears to be added to the input buffer instead of being rendered purely as a visual overlay in the UI layer. This causes the preview text to be treated as user input.Impact:
Plugins
None
OpenCode version
1.1.42
Steps to reproduce
[Pasted ~130 lines]appearsScreenshot and/or share link
No response
Operating System
MacOS 15.7.3
Terminal
ITerm2