structured data editor
git clone https://git.lucas.co/cce-data-editor.git
feat: bevel preview opens cce-bevel targeted at the file being edited
Pass --config <current file> when spawning cce-bevel from the (bevel)
preview, so a per-app config's relief keys are edited and saved in that
file — not silently in the shared config.kdl.
Co-Authored-By: Claude Fable 5 <[email protected]>
src/main.rs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/main.rs b/src/main.rs
index aa74c69..ab48e22 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -627,7 +627,13 @@ impl DataEditorApp {
}
let local = format!("{home}/.local/bin/cce-bevel");
let cmd = if std::path::Path::new(&local).exists() { local } else { "cce-bevel".to_string() };
- match std::process::Command::new(&cmd).spawn() {
+ let mut command = std::process::Command::new(&cmd);
+ // Target the file being edited: per-app configs get their own
+ // material instead of cce-bevel's default shared-config.kdl save.
+ if let Some(ref path) = self.current_file_path {
+ command.args(["--config", &path.to_string_lossy()]);
+ }
+ match command.spawn() {
Ok(child) => self.bevel_child = Some(child),
Err(e) => self.status_message = Some((format!("cce-bevel launch failed: {e}"), true)),
}