diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-10 17:11:50 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-10 17:28:31 +0300 |
| commit | 3e8f9df14e6dd08a8d80d920b923870a80649f0b (patch) | |
| tree | ea854ca617d1ca21a09d1e7aa9246ffc5f6e842b /src/config.rs | |
| parent | 66be0b655fe922867f1eed100a41d67038b6ffd6 (diff) | |
fix: improve config diagnostic delivery
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs index f3dc9dbb..a2d3f89f 100644 --- a/src/config.rs +++ b/src/config.rs @@ -67,9 +67,21 @@ impl Config { .chain(keybind_diags) .chain(self.remote_image_paste_key().err()) .chain(self.ui.sound.diagnostics()) + .chain(self.invalid_sidebar_bounds_diagnostic()) .collect() } + pub(crate) fn invalid_sidebar_bounds_diagnostic(&self) -> Option<String> { + validated_sidebar_bounds(self.ui.sidebar_min_width, self.ui.sidebar_max_width) + .is_none() + .then(|| { + format!( + "ui.sidebar_min_width ({}) is greater than sidebar_max_width ({})", + self.ui.sidebar_min_width, self.ui.sidebar_max_width + ) + }) + } + pub(crate) fn remote_image_paste_key(&self) -> Result<Option<(KeyCode, KeyModifiers)>, String> { let raw = self.keys.remote_image_paste.trim(); if raw.is_empty() { |
