Skip to content

Add a config option to disable copy-on-select #124

Closed

Description

@Gerrit-K

Problem

A mouse drag in the document view copies the selection to the clipboard on mouse-up.
event_loop in crates/plannotator-tui/src/cli.rs sets app.clipboard = true, and
finish_selection in app/input.rs then calls Clipboard.deliver(text), which writes an OSC 52
sequence. No config key controls this.

Impact

Herdr users who set ui.copy_on_select = false (select first, then copy with Ctrl+C) still get
an automatic copy inside plannotator-tui. The clipboard is overwritten without a copy action.
The herdr-annotate README recommends copy_on_select = false for remote sessions, so the two
tools disagree.

Proposal

Add a [ui] key to ~/.config/plannotator-tui/config.toml:

[ui]
copy_on_select = true   # default keeps today's behavior
  • event_loop sets app.clipboard from this value instead of true.
  • With false, the selection stays highlighted. An explicit key (for example y, or the existing
    interrupt binding) copies it.

Version

plannotator-tui 0.9.7 (via herdr-annotate 0.9.7), herdr 0.9.5, macOS.

Activity

  1. backnotprop commented on Oct 29, 2026

    @backnotprop
    Contributor

    Shipped in 0.9.9 (herdr-annotate 0.9.9). Set [ui] copy_on_select = false and nothing is copied on release; press y on the selection to copy it. Thanks for the clear report.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions