Skip to content

Paste preview indicator "[Pasted ~N lines]" incorrectly included in submitted input #11143

@CodingOX

Description

@CodingOX

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:

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

  1. Copy a text block containing more than ~130 lines (or whatever threshold triggers the preview)
  2. Paste the content into the OpenCode terminal input area
  3. Observe the preview indicator: [Pasted ~130 lines] appears
  4. Press Enter to submit the input
  5. 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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions