Skip to content

The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.

fix(timeline): Ctrl+B splits the selected clip, not every track under the playhead

Jareer248b482c8e36
diff --git a/src/crates/concat/src/lib.rs b/src/crates/concat/src/lib.rs
index dbf21d55..f64cd1b4 100644
--- a/src/crates/concat/src/lib.rs
+++ b/src/crates/concat/src/lib.rs
@@ -1786,9 +1786,11 @@ fn start(project: Option<std::path::PathBuf>, smoke: bool) -> Result<(), slint::
state.seek(end);
}
"delete" => state.delete_selected(),
+ // The selected clips, as the tray's button splits, or
+ // everything under the playhead when none is.
"split" => {
let at = state.playhead;
- state.split_at(at, false);
+ state.split_at(at, true);
}
"save" => state.save(true),
_ => {}
diff --git a/src/crates/concat/src/studio.rs b/src/crates/concat/src/studio.rs
index 3b68ce14..3d54728e 100644
--- a/src/crates/concat/src/studio.rs
+++ b/src/crates/concat/src/studio.rs
@@ -10249,9 +10249,12 @@ impl Studio {
pub fn shortcut(&mut self, action: &str) {
log::info!("shortcut: {action}");
match action {
+ // The selected clips when there are any, as the tray's button
+ // and the menu split: the chord cut every track under the
+ // playhead whatever was selected, titles and music with it.
"split" => {
let at = self.playhead;
- self.split_at(at, false);
+ self.split_at(at, true);
}
"split-selected" => {
let at = self.playhead;