diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-08-07 20:59:32 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-07 20:59:32 +0300 |
| commit | bdb5222eec9109f4a337ab79d12c3f3ee3cd7a4b (patch) | |
| tree | 1081a0036513199d17b35f8de9e43c9841c7be36 /src/config/io.rs | |
| parent | 00f04ac65cedf882f9785c0aa20831523c554dd0 (diff) | |
fix(config): report unknown theme names (#2488)
refs #2452
Diffstat (limited to 'src/config/io.rs')
| -rw-r--r-- | src/config/io.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/config/io.rs b/src/config/io.rs index b6a70427..7ed82395 100644 --- a/src/config/io.rs +++ b/src/config/io.rs @@ -341,6 +341,8 @@ fn load_live_config_from_str(content: &str) -> Result<LoadedConfig, Vec<String>> |section| config.remote = section, ); + diagnostics.extend(config.theme.diagnostics()); + Ok(LoadedConfig { config, diagnostics, @@ -864,6 +866,20 @@ resume_agents_on_restore = true } #[test] + fn load_live_config_warns_about_unknown_theme_names() { + let loaded = load_live_config_from_str( + r#" +[theme] +name = "catppucin" +"#, + ) + .unwrap(); + + assert_eq!(loaded.diagnostics.len(), 1); + assert!(loaded.diagnostics[0].contains("theme.name = \"catppucin\"")); + } + + #[test] fn load_live_config_warns_about_unknown_top_level_sections() { let loaded = load_live_config_from_str( r#" |
