feat: add configurable cursor style for TUI textareas #8045

Open
opened 2026-02-16 18:09:00 -05:00 by yindo · 1 comment
Owner

Originally created by @widdsun on GitHub (Jan 30, 2026).

Originally assigned to: @kommander on GitHub.

Problem

Currently, the cursor style in OpenCode TUI is hardcoded. Users cannot customize the cursor appearance (block, line, underline) or control whether it blinks.

The underlying @opentui/core library already supports CursorStyle type ("block" | "line" | "underline") and CursorStyleOptions ({ style: CursorStyle, blinking: boolean }), but OpenCode doesn't expose this as a configurable option.

Proposed Solution

Add two new configuration options to the tui section of opencode.json:

  • cursor_style: "block" | "line" | "underline" (default: "block")
  • cursor_blink: boolean (default: true)

Example Configuration

{
  "tui": {
    "cursor_style": "underline",
    "cursor_blink": false
  }
}

Implementation

Apply the cursor style settings to all textarea components:

  • Main prompt textarea
  • Question textarea
  • Permission reject prompt textarea
  • Dialog prompt textarea
  • Export options textarea

Use Case

Users who prefer a stable underline cursor (common in many terminal applications) instead of the default blinking block cursor.

Originally created by @widdsun on GitHub (Jan 30, 2026). Originally assigned to: @kommander on GitHub. ## Problem Currently, the cursor style in OpenCode TUI is hardcoded. Users cannot customize the cursor appearance (block, line, underline) or control whether it blinks. The underlying `@opentui/core` library already supports `CursorStyle` type (`"block" | "line" | "underline"`) and `CursorStyleOptions` (`{ style: CursorStyle, blinking: boolean }`), but OpenCode doesn't expose this as a configurable option. ## Proposed Solution Add two new configuration options to the `tui` section of `opencode.json`: - `cursor_style`: `"block"` | `"line"` | `"underline"` (default: `"block"`) - `cursor_blink`: `boolean` (default: `true`) ### Example Configuration ```json { "tui": { "cursor_style": "underline", "cursor_blink": false } } ``` ## Implementation Apply the cursor style settings to all textarea components: - Main prompt textarea - Question textarea - Permission reject prompt textarea - Dialog prompt textarea - Export options textarea ## Use Case Users who prefer a stable underline cursor (common in many terminal applications) instead of the default blinking block cursor.
yindo added the opentui label 2026-02-16 18:09:00 -05:00
Author
Owner

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

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

  • #5364: [FEATURE]: Non-blinking caret / cursor - directly requests the ability to disable cursor blinking
  • #1905: Terminal cursor blinks in opencode even though it shouldn't - reports that terminal non-blinking cursor settings are not being respected and cursor always blinks in OpenCode

Feel free to ignore if this addresses a different aspect of cursor customization.

@github-actions[bot] commented on GitHub (Jan 30, 2026): This issue might be a duplicate of existing issues. Please check: - #5364: [FEATURE]: Non-blinking caret / cursor - directly requests the ability to disable cursor blinking - #1905: Terminal cursor blinks in opencode even though it shouldn't - reports that terminal non-blinking cursor settings are not being respected and cursor always blinks in OpenCode Feel free to ignore if this addresses a different aspect of cursor customization.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8045