fix(tui): trim whitespace-only selection chrome

- clamp selection highlight to real row content so blank drag margins do not render or copy
- keep successful copy actions quiet while preserving usage and failure feedback
This commit is contained in:
Brooklyn Nicholson 2026-04-25 15:07:29 -05:00
parent a68793b6c4
commit 876bb60044
4 changed files with 98 additions and 9 deletions

View file

@ -269,7 +269,6 @@ export const coreCommands: SlashCommand[] = [
}
writeOsc52Clipboard(target.text)
sys(`copied ${target.text.length} chars`)
}
},

View file

@ -30,11 +30,7 @@ export function useInputHandlers(ctx: InputHandlerContext): InputHandlerResult {
const copySelection = () => {
// ink's copySelection() already calls setClipboard() which handles
// pbcopy (macOS), wl-copy/xclip (Linux), tmux, and OSC 52 fallback.
const text = terminal.selection.copySelection()
if (text) {
actions.sys(`copied ${text.length} chars`)
}
terminal.selection.copySelection()
}
const clearSelection = () => {