mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-07-17 07:46:57 +02:00
restruct: 8e
This commit is contained in:
parent
a8febbe96f
commit
95ba0d6feb
2 changed files with 4 additions and 4 deletions
|
|
@ -56,13 +56,13 @@ pub(crate) fn load_bind (binds: &Binds, name: &impl AsRef<str>, body: &impl Lang
|
||||||
|
|
||||||
impl Bind<TuiEvent, Arc<str>> {
|
impl Bind<TuiEvent, Arc<str>> {
|
||||||
pub fn load (lang: &impl Language) -> Usually<Self> {
|
pub fn load (lang: &impl Language) -> Usually<Self> {
|
||||||
let mut map = Bind::new();
|
let mut map = Self::new();
|
||||||
lang.each(|item|if item.expr().head() == Ok(Some("see")) {
|
lang.each(|item|if item.expr().head() == Ok(Some("see")) {
|
||||||
// TODO
|
// TODO
|
||||||
Ok(())
|
Ok(())
|
||||||
} else if let Ok(Some(_word)) = item.expr().head().word() {
|
} else if let Ok(Some(_word)) = item.expr().head().word() {
|
||||||
if let Some(key) = TuiKey::from_dsl(item.expr()?.head()?)? {
|
if let Some(event) = TuiKey::from_dsl(item.expr()?.head()?)?.to_crossterm() {
|
||||||
map.add(key, Binding {
|
map.add(TuiEvent(event), Binding {
|
||||||
commands: [item.expr()?.tail()?.unwrap_or_default().into()].into(),
|
commands: [item.expr()?.tail()?.unwrap_or_default().into()].into(),
|
||||||
condition: None,
|
condition: None,
|
||||||
description: None,
|
description: None,
|
||||||
|
|
|
||||||
2
tengri
2
tengri
|
|
@ -1 +1 @@
|
||||||
Subproject commit dd7091bda11504a16ba8de0c0b719359df37b5ef
|
Subproject commit 53c9438f7d9990d60adc1a25cccfdd2971a07500
|
||||||
Loading…
Add table
Add a link
Reference in a new issue