Commit graph

1 commit

Author SHA1 Message Date
Wesley Simplicio
a2920b1762 fix(tui): right-click copies selection, only pastes when no selection
Sub-issue 5 of #22034.

Right-click on the composer always pasted from the clipboard, even when
the user had highlighted text — diverging from terminal-native behavior
(xterm/iTerm/gnome-terminal) where right-click copies an active selection
and only pastes when nothing is selected.

Extract a small pure helper, decideRightClickAction(value, range), and
route the existing onMouseDown right-click branch through it. Selection
present and non-empty -> writeClipboardText(slice). Otherwise fall back
to the existing emitPaste path.
2026-05-10 16:06:33 -07:00