mirror of
https://git.meli.delivery/meli/meli
synced 2024-11-17 03:26:20 +00:00
ui: add two readline shortcuts in text fields
This commit is contained in:
parent
1a02491f04
commit
565b11634a
@ -187,6 +187,17 @@ impl Component for Field {
|
||||
}
|
||||
}
|
||||
}
|
||||
UIEvent::InsertInput(Key::Ctrl('a')) => {
|
||||
if let Text(ref mut s, _) = self {
|
||||
s.set_cursor(0);
|
||||
}
|
||||
}
|
||||
UIEvent::InsertInput(Key::Ctrl('e')) => {
|
||||
if let Text(ref mut s, _) = self {
|
||||
s.set_cursor(s.as_str().len());
|
||||
}
|
||||
}
|
||||
/* TODO: add rest of readline shortcuts */
|
||||
_ => {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user