wip: implementing app command dispatch

This commit is contained in:
🪞👃🪞 2025-01-14 19:03:08 +01:00
parent d393cab2d8
commit 12faadef44
31 changed files with 598 additions and 551 deletions

View file

@ -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 }