class

Fancyline::Widget::HistorySearch

Inherits Fancyline::Widget / Reference / Object

Implements a simple history search feature. Activated by hitting "Ctrl-R", then accepts non-control input, Backspace and Up/Down.

Instance methods

editor
Source
editor?
Source
handle(ctx : Context, char : Char) : Bool

Called on user-input. Return true if you handeled the input, return false to handle it as normal input by the Context.

The default implementation calls Context#stop_widget to remove itself, and returns false.

Source
history
Source
history?
Source
move_entry(ctx, offset)
Source
needle_regex
Source
restore_original(ctx)
Source
search_prompt
Source
start(ctx : Context)

Called when the widget is activated.

Source
stop(ctx : Context)

Called when the widget is removed.

Source
update_results(ctx)
Source