class Fancyline::Widget::HistorySearch
- Fancyline::Widget::HistorySearch
- Fancyline::Widget
- Reference
- Object
Overview
Implements a simple history search feature. Activated by hitting "Ctrl-R", then accepts non-control input, Backspace and Up/Down.
Defined in:
fancyline/widget/history_search.crInstance Method Summary
- #editor : Editor | Nil
- #editor? : Editor | Nil | Nil
-
#handle(ctx : Context, char : Char) : Bool
Called on user-input.
- #history : Fancyline::History | Nil
- #history? : Fancyline::History | Nil | Nil
- #move_entry(ctx, offset)
- #needle_regex
- #restore_original(ctx)
- #search_prompt
-
#start(ctx : Context)
Called when the widget is activated.
-
#stop(ctx : Context)
Called when the widget is removed.
- #update_results(ctx)
Instance methods inherited from class Fancyline::Widget
handle(ctx : Context, char : Char) : Bool
handle,
start(ctx : Context)
start,
stop(ctx : Context)
stop
Instance Method Detail
Description copied from class Fancyline::Widget
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
.
Description copied from class Fancyline::Widget
Called when the widget is activated.
Description copied from class Fancyline::Widget
Called when the widget is removed.