Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
lib: Fix column views in imUI widget
Erik Kundt committed 1 year ago
commit 5b8347c8e5e4484f757ed91957a6687ba543584a
parent 4d1cd93d3f8186cb382a4c7332ed886be8597b0f
1 file changed +8 -5
modified src/ui/im.rs
@@ -986,14 +986,17 @@ pub mod widget {
                ..area
            };

-
            let widths = self
+
            let widths: Vec<Constraint> = self
                .columns
                .iter()
-
                .map(|c| match c.width {
-
                    Constraint::Min(min) => Constraint::Length(min.saturating_add(3)),
-
                    _ => c.width,
+
                .filter_map(|c| {
+
                    if !c.skip && c.displayed(area.width as usize) {
+
                        Some(c.width)
+
                    } else {
+
                        None
+
                    }
                })
-
                .collect::<Vec<_>>();
+
                .collect();

            let cells = self
                .columns