From 8ea76710db73964c312baca2274c86e370a6f3fa Mon Sep 17 00:00:00 2001 From: Junkui Zhang <364772080@qq.com> Date: Wed, 27 Aug 2025 03:03:12 +0800 Subject: [PATCH] better cfg --- crates/settings/src/settings.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/settings/src/settings.rs b/crates/settings/src/settings.rs index 7ec2d423c6..1966755d62 100644 --- a/crates/settings/src/settings.rs +++ b/crates/settings/src/settings.rs @@ -87,12 +87,12 @@ pub fn default_settings() -> Cow<'static, str> { #[cfg(target_os = "macos")] pub const DEFAULT_KEYMAP_PATH: &str = "keymaps/default-macos.json"; -#[cfg(target_os = "linux")] -pub const DEFAULT_KEYMAP_PATH: &str = "keymaps/default-linux.json"; - #[cfg(target_os = "windows")] pub const DEFAULT_KEYMAP_PATH: &str = "keymaps/default-windows.json"; +#[cfg(not(any(target_os = "macos", target_os = "windows")))] +pub const DEFAULT_KEYMAP_PATH: &str = "keymaps/default-linux.json"; + pub fn default_keymap() -> Cow<'static, str> { asset_str::(DEFAULT_KEYMAP_PATH) }