From 36fe332967eace2d6b3ffbeb340a8960e97095fa Mon Sep 17 00:00:00 2001 From: unspeaker Date: Fri, 9 May 2025 02:05:01 +0300 Subject: [PATCH] 0.2.2: don't crash on 't' key (thx @magicpotatobean) --- crates/app/src/api.rs | 13 ++++++------- crates/cli/edn/arranger_keys.edn | 3 ++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/app/src/api.rs b/crates/app/src/api.rs index 660c2f30..e968a796 100644 --- a/crates/app/src/api.rs +++ b/crates/app/src/api.rs @@ -80,6 +80,12 @@ expose!([self: Tek] { Selection::Clip(0, s) => Selection::Scene(s), Selection::Clip(t, s) => Selection::Clip(t - 1, s), }, + ":track-header" => match self.selected { + Selection::Mix => Selection::Mix, + Selection::Scene(s) => Selection::Mix, + Selection::Track(t) => Selection::Track((t + 1) % self.tracks.len()), + Selection::Clip(t, _) => Selection::Track((t + 1) % self.tracks.len()), + }, } }); @@ -126,13 +132,6 @@ impose!([app: Tek] { OutputCommand::try_from_expr(app, a).map(Self::Output)) ("select" [t: Selection] Some(t.map(Self::Select).expect("no selection"))) - ("select" [t: usize, s: usize] - Some(match (t.expect("no track"), s.expect("no scene")) { - (0, 0) => Self::Select(Selection::Mix), - (t, 0) => Self::Select(Selection::Track(t)), - (0, s) => Self::Select(Selection::Scene(s)), - (t, s) => Self::Select(Selection::Clip(t, s)), - })) } ClipCommand => { diff --git a/crates/cli/edn/arranger_keys.edn b/crates/cli/edn/arranger_keys.edn index 46060ffd..95768ce7 100644 --- a/crates/cli/edn/arranger_keys.edn +++ b/crates/cli/edn/arranger_keys.edn @@ -2,7 +2,6 @@ (@shift-u redo 1) (@space clock toggle) (@shift-space clock toggle 0) -(@t select :track 0) (@tab edit :clip) (@c color) (@q launch) @@ -19,3 +18,5 @@ (@a select :track-prev) (@right select :track-next) (@d select :track-next) + +(@t select :track-header)