opencode icon indicating copy to clipboard operation
opencode copied to clipboard

TUI - single-line paste moves cursor to the end of input

Open Nindaleth opened this issue 1 week ago • 3 comments

Description

When pasting into the TUI, the cursor is always moved to the end of the input box. This applies to both the initial input box that leads to creation of a new session, and its equivalent during conversation.

I guess the issue is somewhere in OpenTUI, but I don't have any other OpenTUI app to confirm.

Doesn't seem terminal-specific.

Plugins

obra/superpowers, @franlol/[email protected]

OpenCode version

1.1.4

Steps to reproduce

  1. Store a word in OS clipboard, for example "terminal". Anything will work as long as it's not multiline (which would trigger the "pasted N lines" block feature instead of pasting text directly).
  2. Manually enter multiple lines into the input so that it looks like this:
<cursor>line1
line2
line3
  1. Paste (both Shift+Insert and Ctrl+Shift+V do the same thing on my env)
  2. Observe unwanted cursor movement:
terminalline1
line2
line3<cursor>

Screenshot and/or share link

No response

Operating System

Linux Fedora 43

Terminal

Ghostty, Terminator

Nindaleth avatar Jan 07 '26 14:01 Nindaleth