mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
rollover instead of crashing when out of bounds in arranger
This commit is contained in:
parent
1757fdf765
commit
95aba6bd59
1 changed files with 2 additions and 2 deletions
|
|
@ -7,9 +7,9 @@ pub fn to_arranger_clip_command (input: &TuiInput, t: usize, len_t: usize, s: us
|
|||
use ArrangerClipCommand as Clip;
|
||||
Some(match input.event() {
|
||||
key_pat!(Char('w')) => Cmd::Select(if s > 0 { Select::Clip(t, s - 1) } else { Select::Track(t) }),
|
||||
key_pat!(Char('s')) => Cmd::Select(Select::Clip(t, s + 1)),
|
||||
key_pat!(Char('s')) => Cmd::Select(Select::Clip(t, (s + 1) % len_s)),
|
||||
key_pat!(Char('a')) => Cmd::Select(if t > 0 { Select::Clip(t - 1, s) } else { Select::Scene(s) }),
|
||||
key_pat!(Char('d')) => Cmd::Select(Select::Clip(t + 1, s)),
|
||||
key_pat!(Char('d')) => Cmd::Select(Select::Clip((t + 1) % len_t, s)),
|
||||
key_pat!(Char(',')) => Cmd::Clip(Clip::Set(t, s, None)),
|
||||
key_pat!(Char('.')) => Cmd::Clip(Clip::Set(t, s, None)),
|
||||
key_pat!(Char('<')) => Cmd::Clip(Clip::Set(t, s, None)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue