Repository navigation
Input edge events, drag-selection in inputs, copy and raw terminal writes - #3
Merged
Merged
Conversation
…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.
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.
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.