KetraTerm
API · v0.3.0All versions

TerminalTextReplacementEvent

data class TerminalTextReplacementEvent(val deleteAfterCursorCount: Int, val deleteBeforeCursorCount: Int, val replacementText: String)

One logical terminal text replacement around the active cursor.

Counts are terminal editor actions, not UTF-16 or code-point counts. The UI that owns the edited text must translate its text model into the number of Delete and Backspace actions required by the host editor.

Constructors

Link copied to clipboard
constructor(deleteAfterCursorCount: Int, deleteBeforeCursorCount: Int, replacementText: String)

Properties

Link copied to clipboard

Delete key presses emitted before any Backspace presses.

Link copied to clipboard

Backspace key presses emitted after the suffix has been deleted.

Link copied to clipboard

text pasted after both deletion phases; an empty value represents deletion without insertion.