Auto-copy highlighted text to clipboard on mouse-up - #446
Merged
Conversation
OpenTUI emits CliRenderEvents.SELECTION once when a drag-select finishes (mouse-up). A new copyFinishedSelection handler writes the selected text through the system clipboard port, flashes a status line with a char count and preview, then clears the highlight so the selection does not linger. Empty selections and mid-drag updates are no-ops. The Alt+M flash copy is updated to name the new behavior, and docs/TUI.md documents the drag-select-copy path alongside the existing Alt+M and Alt+C chords.
Align Alt+M copy/help strings and docs with mouse-up clipboard copy, and pin the SELECTION event path through a live shell.
Keep the status flash single-line for short drag-selects, and make the help row describe mouse capture as a toggle with capture as the default.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CliRenderEvents.SELECTION→copyFinishedSelection)docs/TUI.mdupdated to describe the new path alongside Alt+CCloses CL-5614.
Test plan
copyFinishedSelection(copy, skip drag, skip empty, long preview)