KetraTerm
API · DevelopmentAll versions

TerminalShellCommandLineSnapshot

data class TerminalShellCommandLineSnapshot(val commandText: String, val cursorOffset: Int, val cursorColumn: Int, val cursorRow: Int)

Immutable snapshot of the shell command line currently known to the session.

The optional OSC integration extracts bounded text from prompt markers and synchronized render frames, only when the cursor is at the visible end. A host-owned shell editor can instead supply its complete logical command text and an offset anywhere in that text through TerminalShellIntegrationFactory.host. Hosts own their source's text limits and publish updates when text, cursor, anchor, or availability changes. Snapshots are consumed outside paint loops.

Constructors

Link copied to clipboard
constructor(commandText: String, cursorOffset: Int, cursorColumn: Int, cursorRow: Int)

Properties

Link copied to clipboard

complete known command-line text, without the prompt.

Link copied to clipboard

zero-based live terminal-grid cursor column to use as a popup anchor.

Link copied to clipboard

UTF-16 cursor offset within commandText.

Link copied to clipboard

zero-based live terminal-grid cursor row to use as a popup anchor.