You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Paste preview indicator "[Pasted ~N lines]" incorrectly included in submitted input #11143
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:
xxxline1
line2
line3
...
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
Reacted by Geeder, LY, Kevin Stephen and singhgaurav8565-create
Activity
github-actions commentedon Jan 29, 2026
This issue might be a duplicate of existing issues. Please check:
[Pasted ~1 lines]) #8501: [FEATURE]: Allow to expand the pasted text (e.g.[Pasted ~1 lines]) - Related to the paste preview indicator featureFeel free to ignore if none of these address your specific case.
CodingOX commentedon Jan 30, 2026
No, they’re not the same issue.
lll9p commentedon Feb 25, 2026
Any updates? This problem has been bothering me for a long time.
changchinlan commentedon Mar 13, 2026
#17034
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.