From 165fa98a90c0e62367dcff1575b8fa70ef1ed4d5 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 13 Oct 2026 04:21:20 -0400 Subject: [PATCH] Count tracks, not lanes, in track.clear_trim_automation's result Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd/track_more.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/track_more.rs b/crates/engine/src/cmd/track_more.rs index e14e0679..db627803 100644 --- a/crates/engine/src/cmd/track_more.rs +++ b/crates/engine/src/cmd/track_more.rs @@ -455,7 +455,9 @@ pub(super) fn clear_trim(e: &mut Engine, p: &Value) -> Result { let Some(tr) = s.track_mut(*t) else { continue }; let before = tr.automation.len(); tr.automation.retain(|l| l.param != trim_param()); - n += before - tr.automation.len(); + if tr.automation.len() < before { + n += 1; + } } Ok(json!({"tracks": n})) }