0.2.2: don't crash on 't' key (thx @magicpotatobean)

This commit is contained in:
🪞👃🪞 2025-05-09 02:05:01 +03:00
parent 46760bf8f0
commit e7ec711a49
4 changed files with 16 additions and 16 deletions

View file

@ -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 => {