class

Icr::EditState

Inherits Reference < Object

Single-line editing model: the buffer, a char cursor, and ↑/↓ history navigation that preserves the draft being typed (hcode's TUI::Editor history_index convention: -1 = "not browsing yet"). Pure state — the adapter renders it.

Constructors

new(history : Array(String))
Source

Instance methods

buffer
Source
cursor
Source
handle(event : Icr::KeyEvent) : Nil
Source
insert_text(text : String) : Nil

Insert a whole chunk of text at the cursor (completion results).

Source