aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs12
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() {