mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
cargo check -> cargo test; add cloc at end
+ don't fallthrough to sequencer on arranger edges
This commit is contained in:
parent
41761f6793
commit
ac0ee26b7c
3 changed files with 18 additions and 9 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
pkg-config
|
pkg-config
|
||||||
freetype
|
freetype
|
||||||
libclang
|
libclang
|
||||||
|
cloc
|
||||||
#bear
|
#bear
|
||||||
];
|
];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,4 @@ jobs:
|
||||||
- run: nix-channel --list && nix-channel --update
|
- run: nix-channel --list && nix-channel --update
|
||||||
- run: nix-shell -p git --command 'git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .'
|
- run: nix-shell -p git --command 'git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .'
|
||||||
- run: whoami && pwd && ls -al
|
- run: whoami && pwd && ls -al
|
||||||
- run: nix-shell --command 'cargo version -vv && cargo check' .forgejo/workflows/build.nix
|
- run: nix-shell --command 'cargo version -vv && cargo test && cloc crates/tek/src' .forgejo/workflows/build.nix
|
||||||
|
|
|
||||||
|
|
@ -98,11 +98,11 @@ fn to_arrangement_command (state: &ArrangerTui, input: &TuiInput) -> Option<Arra
|
||||||
key_pat!(Char('l')) => Some(Cmd::Clip(ArrangerClipCommand::SetLoop(t, s, false))),
|
key_pat!(Char('l')) => Some(Cmd::Clip(ArrangerClipCommand::SetLoop(t, s, false))),
|
||||||
key_pat!(Delete) => Some(Cmd::Clip(Clip::Put(t, s, None))),
|
key_pat!(Delete) => Some(Cmd::Clip(Clip::Put(t, s, None))),
|
||||||
|
|
||||||
key_pat!(Up) => Some(Cmd::Select(
|
key_pat!(Up) => Some(Cmd::Select(
|
||||||
if s > 0 { Selected::Clip(t, s - 1) } else { Selected::Track(t) })),
|
if s > 0 { Selected::Clip(t, s - 1) } else { Selected::Track(t) })),
|
||||||
key_pat!(Down) => Some(Cmd::Select(
|
key_pat!(Down) => Some(Cmd::Select(
|
||||||
Selected::Clip(t, (s + 1).min(s_len.saturating_sub(1))))),
|
Selected::Clip(t, (s + 1).min(s_len.saturating_sub(1))))),
|
||||||
key_pat!(Left) => Some(Cmd::Select(
|
key_pat!(Left) => Some(Cmd::Select(
|
||||||
if t > 0 { Selected::Clip(t - 1, s) } else { Selected::Scene(s) })),
|
if t > 0 { Selected::Clip(t - 1, s) } else { Selected::Scene(s) })),
|
||||||
key_pat!(Right) => Some(Cmd::Select(
|
key_pat!(Right) => Some(Cmd::Select(
|
||||||
Selected::Clip((t + 1).min(t_len.saturating_sub(1)), s))),
|
Selected::Clip((t + 1).min(t_len.saturating_sub(1)), s))),
|
||||||
|
|
@ -118,10 +118,12 @@ fn to_arrangement_command (state: &ArrangerTui, input: &TuiInput) -> Option<Arra
|
||||||
key_pat!(Delete) => Some(Cmd::Scene(Scene::Delete(s))),
|
key_pat!(Delete) => Some(Cmd::Scene(Scene::Delete(s))),
|
||||||
key_pat!(Char('c')) => Some(Cmd::Scene(Scene::SetColor(s, ItemPalette::random()))),
|
key_pat!(Char('c')) => Some(Cmd::Scene(Scene::SetColor(s, ItemPalette::random()))),
|
||||||
|
|
||||||
key_pat!(Up) => Some(
|
key_pat!(Up) => Some(
|
||||||
Cmd::Select(if s > 0 { Selected::Scene(s - 1) } else { Selected::Mix })),
|
Cmd::Select(if s > 0 { Selected::Scene(s - 1) } else { Selected::Mix })),
|
||||||
key_pat!(Down) => Some(
|
key_pat!(Down) => Some(
|
||||||
Cmd::Select(Selected::Scene((s + 1).min(s_len.saturating_sub(1))))),
|
Cmd::Select(Selected::Scene((s + 1).min(s_len.saturating_sub(1))))),
|
||||||
|
key_pat!(Left) =>
|
||||||
|
return None,
|
||||||
key_pat!(Right) => Some(
|
key_pat!(Right) => Some(
|
||||||
Cmd::Select(Selected::Clip(0, s))),
|
Cmd::Select(Selected::Clip(0, s))),
|
||||||
|
|
||||||
|
|
@ -135,9 +137,11 @@ fn to_arrangement_command (state: &ArrangerTui, input: &TuiInput) -> Option<Arra
|
||||||
key_pat!(Delete) => Some(Cmd::Track(Track::Delete(t))),
|
key_pat!(Delete) => Some(Cmd::Track(Track::Delete(t))),
|
||||||
key_pat!(Char('c')) => Some(Cmd::Track(Track::SetColor(t, ItemPalette::random()))),
|
key_pat!(Char('c')) => Some(Cmd::Track(Track::SetColor(t, ItemPalette::random()))),
|
||||||
|
|
||||||
key_pat!(Down) => Some(
|
key_pat!(Up) =>
|
||||||
|
return None,
|
||||||
|
key_pat!(Down) => Some(
|
||||||
Cmd::Select(Selected::Clip(t, 0))),
|
Cmd::Select(Selected::Clip(t, 0))),
|
||||||
key_pat!(Left) => Some(
|
key_pat!(Left) => Some(
|
||||||
Cmd::Select(if t > 0 { Selected::Track(t - 1) } else { Selected::Mix })),
|
Cmd::Select(if t > 0 { Selected::Track(t - 1) } else { Selected::Mix })),
|
||||||
key_pat!(Right) => Some(
|
key_pat!(Right) => Some(
|
||||||
Cmd::Select(Selected::Track((t + 1).min(t_len.saturating_sub(1))))),
|
Cmd::Select(Selected::Track((t + 1).min(t_len.saturating_sub(1))))),
|
||||||
|
|
@ -149,8 +153,12 @@ fn to_arrangement_command (state: &ArrangerTui, input: &TuiInput) -> Option<Arra
|
||||||
key_pat!(Char('0')) => Some(Cmd::StopAll),
|
key_pat!(Char('0')) => Some(Cmd::StopAll),
|
||||||
key_pat!(Char('c')) => Some(Cmd::Color(ItemPalette::random())),
|
key_pat!(Char('c')) => Some(Cmd::Color(ItemPalette::random())),
|
||||||
|
|
||||||
key_pat!(Down) => Some(
|
key_pat!(Up) =>
|
||||||
|
return None,
|
||||||
|
key_pat!(Down) => Some(
|
||||||
Cmd::Select(Selected::Scene(0))),
|
Cmd::Select(Selected::Scene(0))),
|
||||||
|
key_pat!(Left) =>
|
||||||
|
return None,
|
||||||
key_pat!(Right) => Some(
|
key_pat!(Right) => Some(
|
||||||
Cmd::Select(Selected::Track(0))),
|
Cmd::Select(Selected::Track(0))),
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue