mirror of https://github.com/lapce/lapce.git
Fix terminal default profile saving incorrectly (#3142)
This commit is contained in:
parent
bc617f8995
commit
2202343cdc
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue