Skip to content

Paste-then-type text corruption in command line input box: content overwriting/loss #22785

Closed as not planned

Description

@mirachine

Description

Bug Description

When pasting text (especially content containing Chinese characters) into the command line input box and then typing additional text manually (e.g., input like [Pasted ~2 lines] text after paste), two critical content corruption issues occur:

  1. The trailing part of the pasted content is overwritten and lost.
  2. The manually typed content after pasting is overwritten by the pasted content, resulting in the loss of manual input.

Steps to Reproduce

  1. Copy a multi-line text block containing Chinese characters to the clipboard.
  2. Paste the text into the OpenCode command line input box.
  3. Immediately type additional text manually right after the pasted content.
  4. Observe the final input content.

Expected Behavior

  • The pasted content (including Chinese characters) remains fully intact.
  • The manually typed text is appended correctly after the pasted content, with no overwriting or loss.

Actual Behavior

  • Either the end of the pasted content is cut off/lost, or
  • The manually typed text is overwritten by the pasted content and disappears.
  • The issue is observed when the pasted content contains Chinese characters.

Environment

  • OpenCode version: 1.4.6
  • Plugins: None
  • OS Name: Microsoft Windows 11 Pro
  • Version: 25H2
  • OS Build: 26200.8246
  • Experience: Windows Feature Experience Pack 1000.26100.297.0
  • PowerShell Version: 5.1.26100.8115

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Windows 11 Pro, Version 25H2 (Build 26200.8246)

Terminal

Windows PowerShell 5.1.26100.8115

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 16, 2026
  2. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  3. chenyuanrun commented on Jun 14, 2026

    @chenyuanrun

    I have the same problem ,please fix it.

  4. github-actions commented on Aug 14, 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