diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d3fd799..c54f49cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ ### Bug Fixes - [#2779](https://github.com/lapce/lapce/pull/2779): Fix files detection on fresh git/VCS repository - [#3031](https://github.com/lapce/lapce/pull/3031): Fix find not receiving inputs when clicked +- [#3142](https://github.com/lapce/lapce/pull/3142): Fix terminal default profile saving incorrectly ## 0.3.1 diff --git a/lapce-app/src/config.rs b/lapce-app/src/config.rs index e2cfd3b2..a6950277 100644 --- a/lapce-app/src/config.rs +++ b/lapce-app/src/config.rs @@ -933,6 +933,16 @@ pub fn update_file( key: &str, value: toml_edit::Value, ) -> Option<()> { + // TODO: This is a hack to fix the fact that terminal default profile is saved in a + // different manner than other fields. As it is per-operating-system. + // Thus we have to instead set the terminal.default-profile.{OS} + // It would be better to not need a special hack. + let (parent, key) = if parent == "terminal" && key == "default-profile" { + ("terminal.default-profile", std::env::consts::OS) + } else { + (parent, key) + }; + let mut main_table = Self::get_file_table().unwrap_or_default(); // Find the container table