mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
wip: implementing app command dispatch
This commit is contained in:
parent
d393cab2d8
commit
12faadef44
31 changed files with 598 additions and 551 deletions
|
|
@ -1,7 +1,12 @@
|
|||
use crate::*;
|
||||
|
||||
impl EdnInput for TuiIn {
|
||||
fn matches (&self, token: &str) -> bool {
|
||||
false
|
||||
fn matches_edn (&self, token: &str) -> bool {
|
||||
if let Some(event) = parse_key_spec(token.to_string(), KeyModifiers::NONE) {
|
||||
&event == self.event()
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
fn get_event <S: AsRef<str>> (item: &EdnItem<S>) -> Option<Event> {
|
||||
match item { EdnItem::Sym(s) => parse_key_spec(s.as_ref().to_string(), KeyModifiers::NONE), _ => None }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue