aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorwojciechkepka2021-06-18 18:22:15 +0000
committerBenoƮt Cortier2021-06-18 19:18:58 +0000
commit1c1474c3b8dbab8ca4b9a62220c079ddffb7ed9f (patch)
tree1cec97057ec390710d2e728182401fd3bf33300c /helix-term
parentb0522239e750d86432ab53e32aeb1fde99474239 (diff)
Add `ui.statusline.inactive`, use `ui.statusline` for statusline text
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/ui/editor.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index ba5e7574..3dc43d3f 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -476,18 +476,15 @@ impl EditorView {
Mode::Select => "SEL",
Mode::Normal => "NOR",
};
- let text_color = if is_focused {
- theme.get("ui.text.focus")
+ let style = if is_focused {
+ theme.get("ui.statusline")
} else {
- theme.get("ui.text")
+ theme.get("ui.statusline.inactive")
};
// statusline
- surface.set_style(
- Rect::new(viewport.x, viewport.y, viewport.width, 1),
- theme.get("ui.statusline"),
- );
+ surface.set_style(Rect::new(viewport.x, viewport.y, viewport.width, 1), style);
if is_focused {
- surface.set_string(viewport.x + 1, viewport.y, mode, text_color);
+ surface.set_string(viewport.x + 1, viewport.y, mode, style);
}
if let Some(path) = doc.relative_path() {
@@ -499,7 +496,7 @@ impl EditorView {
viewport.y,
title,
viewport.width.saturating_sub(6) as usize,
- text_color,
+ style,
);
}
@@ -538,7 +535,7 @@ impl EditorView {
viewport.x + viewport.width.saturating_sub(text_len),
viewport.y,
right_side_text,
- text_color,
+ style,
);
}