-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
deny processing of inputs by boolean result, basically:
use liner::{Event, Context};
use termion::event::Key;
fn main() {
let mut line = Context::new();
line.read_line("$ ", &mut |Event {editor, kind}| -> bool {
match kind {
EventKind::BeforeKey(Key::Char(c)) => !c.is_whitespace(),
_ => true
}
});
}output:
./target/release/liner-test
$
# <SPACE> <SPACE> <SPACE> <SPACE>
$
# <SPACE> <SPACE> <SPACE> a <SPACE> b <SPACE> c <SPACE>
$ abci accomplished this currently, and terribly with Editor::undo.
Metadata
Metadata
Assignees
Labels
No labels