Skip to content

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

Closed as not planned

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 29, 2026
  2. github-actions commented on Jan 29, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. CodingOX commented on Jan 30, 2026

    @CodingOX
    Author

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

    No, they’re not the same issue.

  4. lll9p commented on Feb 25, 2026

    @lll9p

    Any updates? This problem has been bothering me for a long time.

  5. changchinlan commented on Mar 13, 2026

    @changchinlan
  6. removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  7. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions