From 4535e4c76cf7037119afa27b7d7a75c9cd9fa397 Mon Sep 17 00:00:00 2001 From: Canop Date: Tue, 18 May 2021 20:28:03 +0200 Subject: fix overflowing root fs colors when no foreground color is set Fix #386 --- CHANGELOG.md | 1 + src/filesystems/mount_space_display.rs | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b5d668..7474077 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ### next - add support for backtab key (by default it's bound to :previous_match) +- fix a few minor bugs ### v1.4.0 - 2021-05-11 diff --git a/src/filesystems/mount_space_display.rs b/src/filesystems/mount_space_display.rs index ec914b6..1cd105d 100644 --- a/src/filesystems/mount_space_display.rs +++ b/src/filesystems/mount_space_display.rs @@ -106,10 +106,9 @@ impl<'m, 's> MountSpaceDisplay<'m, 's> { } if e_bar { let pb = ProgressBar::new(s.use_share() as f32, w_bar); + cw.w.queue(ResetColor {})?; if let Some(bg_color) = bg { cw.w.queue(SetBackgroundColor(bg_color))?; - } else { - cw.w.queue(ResetColor {})?; } cw.queue_unstyled_char(' ')?; cw.w.queue(SetBackgroundColor(share_color))?; @@ -126,7 +125,7 @@ impl<'m, 's> MountSpaceDisplay<'m, 's> { // there's not much to print if there's no size info cw.queue_g_string(&txt_style, format!(" {}", &self.mount.info.fs))?; } - + cw.w.queue(ResetColor {})?; Ok(()) } } -- cgit v1.2.3