Skip to content

Status-bar / command-line messages aren't mouse-selectable (GTK can't; TUI has offset bug) #194

Description

@JDonaghy

Problem

Status bar / command line messages (the ones printed by `engine.message`, like `Use :%s/old/new/g for find & replace` after selecting certain palette entries) can't be copied via mouse cleanly on either backend:

GTK: clicking + dragging on the status row does nothing — no selection highlight, no clipboard capture. The text is effectively read-only-display, which makes error messages and status hints frustrating to copy.

TUI: selection works (presumably via Shift+drag native terminal selection, or the app's own selection path), but the visible selection highlight is offset by the width of the activity bar + sidebar. Hiding the sidebar (`:set nosidebar` or toggling the explorer) makes the problem less bad — suggesting the selection math is using absolute screen columns without accounting for the editor-column left offset.

Expected

Both backends: click-drag on any status-bar or command-line text should produce a visible selection highlight that actually matches the cells the mouse traversed, and the selection should be copyable to clipboard.

Suspected Causes

GTK: the status bar's DrawingArea (`draw_window_status_bar` / global status bar / command line) doesn't have a drag gesture controller that tracks selection state + renders a selection rectangle. All clickable behavior is segment-level (LSP status chip, filetype picker, etc.) with no text-selection path.

TUI: `src/tui_main/mouse.rs` — search for `hover_selecting` and the command-line / status-line selection path. The offset-by-sidebar-width symptom suggests the selection anchor is stored as absolute screen col but rendered relative to the editor-column origin (or vice versa).

Files

  • GTK: `src/gtk/draw.rs` (status bar draws), `src/gtk/mod.rs` (status bar DrawingArea setup)
  • TUI: `src/tui_main/mouse.rs` (selection math), `src/tui_main/render_impl.rs` (status bar + cmd line render)
  • Engine: `src/render.rs::CommandLineData`, `src/core/engine/mod.rs` for `message` / selection state

Priority

Minor UX papercut but frequent (can't copy error messages easily). Not blocking anything.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcoordTracked by coord-tui pipelinestatus:readyRefined and ready to enter the work pipeline

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions