module Engine: sig
.. end
Engine
Note: this part know nothing about rendering or completion.
type
selection_state = {
|
sel_text : Text.t ; |
|
sel_mark : Text.pointer ; |
|
sel_cursor : Text.pointer ; |
}
State when the user is doing selection:
type
search_state = {
}
State when searching in the history
type
mode =
The engine mode:
type
state = {
}
An engine state:
val init : Lwt_read_line.history -> state
init history
return a initial state using the given
history
val reset : state -> state
reset state
reset the given state, if the user was doing a
selection, it is canceled
val update : engine_state:state ->
?clipboard:Lwt_read_line.clipboard ->
command:Lwt_read_line.Command.t -> unit -> state
update ~state ?clipboard ~command ()
update an engine state by
processing the given command. It returns the new state, and
may have the side effect of changing the clipboard contents.
clipboard
defaults to the global clipboard.
val edition_state : state -> Lwt_read_line.edition_state
Returns the edition state of a state, whatever its mode is.
val all_input : state -> Text.t
Returns the current complete user input.