diff options
author | Canop <cano.petrole@gmail.com> | 2021-05-18 20:28:03 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2021-05-18 20:30:55 +0200 |
commit | 4535e4c76cf7037119afa27b7d7a75c9cd9fa397 (patch) | |
tree | 662d546a77cf8ed20b498041a49b67d84e8cdb5c | |
parent | 92395cbef4d9cf5b28cb60cebd1fc7e019aa2a5e (diff) |
fix overflowing root fs colors when no foreground color is set
Fix #386
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | 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 <a name="v1.4.0"></a> ### 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(()) } } |