Skip to content

Input edge events, drag-selection in inputs, copy and raw terminal writes - #3

Merged
yogthos merged 1 commit into
mainfrom
input-history-edges-and-selection
Sep 25, 2026
Merged

yogthos merged 1 commit into
mainfrom
input-history-edges-and-selection

Conversation

@yogthos

@yogthos yogthos commented Sep 24, 2026

Copy link
Copy Markdown
Member

Up/Down past a wrapping input's rows fire :on-up-edge / :on-down-edge (for a prompt's history); a value set from outside leaves the cursor at its end. A press in an input no longer claims the mouse, so app-level drag-selection works there, and wrapped text copies as its content rather than one line per row. run gets :on-select, plus copy! (OSC 52) and write-raw!, which posts a raw write to the loop.

…ites

A wrapping input fires :on-up-edge / :on-down-edge when Up or Down would
leave its rows, so a prompt can walk its history; without a handler the
old behaviour stands. A value set from outside puts the cursor at its end.

A press in an input no longer claims the mouse, so FTXUI's app-level
drag-selection can start there. Wrapped text reports a selection as its
content (soft wraps joined, newlines kept) and draws the highlight itself.
run takes :on-select, called when a drag is released, and copy! puts text
on the clipboard with OSC 52. write-raw! posts an escape sequence to the
loop so it lands between frames from any thread.
@yogthos
yogthos merged commit bc391d3 into main Sep 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant