[FEATURE]: Action like input_line_home (and _end), but only for the wrapped pseudo-line #4382

Open
opened 2026-02-16 17:43:37 -05:00 by yindo · 2 comments
Owner

Originally created by @Nindaleth on GitHub (Jan 7, 2026).

Originally assigned to: @kommander on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Logging this as a feature request as I assume this is done on purpose and not a bug.

I would like to have a TUI keybind that moves the cursor to the start/end of the current line as a human sees in the input area, not the full line that was wrapped over multiple rows. That's how most of the text boxes work that I know of (with the infuriating exception of Atlassian BitBucket).

Guess this is targeting OpenTUI, but I'm not sure whether OpenCode does some changes on top of OpenTUI. From the Keybinds doc I see input_line_home and input_buffer_home actions, neither of which do what I'd like.

Example of what I mean:

Starting point:

this is a single long line
in a super narrow window
that is wrapped over<cursor>
multiple rows

Current behavior after input_line_home (as tested with Ghostty and Terminator on Linux):

<cursor>this is a single long line
in a super narrow window
that is wrapped over
multiple rows

What I'd like to have available (input_buffer_line_home?):

this is a single long line
in a super narrow window
<cursor>that is wrapped over
multiple rows
Originally created by @Nindaleth on GitHub (Jan 7, 2026). Originally assigned to: @kommander on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request Logging this as a feature request as I assume this is done on purpose and not a bug. I would like to have a TUI keybind that moves the cursor to the start/end of the current line as a human sees in the input area, not the full line that was wrapped over multiple rows. That's how most of the text boxes work that I know of (with the infuriating exception of Atlassian BitBucket). Guess this is targeting OpenTUI, but I'm not sure whether OpenCode does some changes on top of OpenTUI. From the [Keybinds](https://opencode.ai/docs/keybinds/) doc I see `input_line_home` and `input_buffer_home` actions, neither of which do what I'd like. **Example of what I mean:** Starting point: ``` this is a single long line in a super narrow window that is wrapped over<cursor> multiple rows ``` Current behavior after input_line_home (as tested with Ghostty and Terminator on Linux): ``` <cursor>this is a single long line in a super narrow window that is wrapped over multiple rows ``` What I'd like to have available (input_buffer_line_home?): ``` this is a single long line in a super narrow window <cursor>that is wrapped over multiple rows ```
yindo added the opentuidiscussion labels 2026-02-16 17:43:37 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 7, 2026):

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

  • #7190: Home/End keys navigate history instead of moving cursor within prompt - similar navigation concern
  • #4143: Ctrl+A and Ctrl+E should move to beginning/end of line, not buffer - related readline keybinding issue
  • #2649: Standard keyboard cursor navigation (Home/End key, ctrl+left/right key) - the original request for line vs buffer navigation

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

For keybind-related issues, please also check our pinned keybinds documentation: #4997

@github-actions[bot] commented on GitHub (Jan 7, 2026): This issue might be a duplicate of existing issues. Please check: - #7190: Home/End keys navigate history instead of moving cursor within prompt - similar navigation concern - #4143: Ctrl+A and Ctrl+E should move to beginning/end of line, not buffer - related readline keybinding issue - #2649: Standard keyboard cursor navigation (Home/End key, ctrl+left/right key) - the original request for line vs buffer navigation Feel free to ignore if none of these address your specific case. For keybind-related issues, please also check our pinned keybinds documentation: #4997
Author
Owner

@kommander commented on GitHub (Jan 7, 2026):

Yeah there were conflicting expectations, some people expect it to behave exactly as it does now. The Textarea supports movements based on virtual lines, so it is possible. Needs to be exposed by opentui and made available in opencode.

@kommander commented on GitHub (Jan 7, 2026): Yeah there were conflicting expectations, some people expect it to behave exactly as it does now. The Textarea supports movements based on virtual lines, so it is possible. Needs to be exposed by opentui and made available in opencode.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4382