diff options
author | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-06 20:10:37 +0530 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-06 20:10:56 +0530 |
commit | 0a266d362a11ffd420806cc49ac6884815b0b915 (patch) | |
tree | f5935ad83aad30d452480025df4eff0ceeec41ae /src/interactive/widgets | |
parent | 9ffacd03e256b45ecd40744e5507f37c30ae9b5e (diff) |
Fix header highlight logic, quite literally
Diffstat (limited to 'src/interactive/widgets')
-rw-r--r-- | src/interactive/widgets/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/interactive/widgets/main.rs b/src/interactive/widgets/main.rs index a5640a1..1c70343 100644 --- a/src/interactive/widgets/main.rs +++ b/src/interactive/widgets/main.rs @@ -94,9 +94,9 @@ impl MainWindow { let bg_color = { let marked = mark_pane.as_ref().map(|(_, p)| p.marked()); - match (marked.map(|m| m.is_empty()), state.focussed) { - (Some(false), FocussedPane::Mark) => Color::LightRed, - (Some(false), _) | (None, _) => COLOR_MARKED_LIGHT, + match (marked.map_or(true, |m| m.is_empty()), state.focussed) { + (false, FocussedPane::Mark) => Color::LightRed, + (false, _) => COLOR_MARKED_LIGHT, (_, _) => Color::White, } }; |