diff --git a/book/src/themes.md b/book/src/themes.md index 1bc2627dd..258fd451e 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -269,6 +269,7 @@ #### Interface | Key | Notes | | --- | --- | | `ui.background` | | +| `ui.background.inactive` | Background of unfocused document | | `ui.background.separator` | Picker separator below input line | | `ui.cursor` | | | `ui.cursor.normal` | | diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index f7541fe25..433233a0f 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -98,6 +98,10 @@ pub fn render_view( let text_annotations = view.text_annotations(doc, Some(theme)); let mut decorations = DecorationManager::default(); + if !is_focused { + surface.set_style(area, theme.get("ui.background.inactive")) + } + if is_focused && config.cursorline { decorations.add_decoration(Self::cursorline(doc, view, theme)); }