diff --git a/book/src/themes.md b/book/src/themes.md index 3ef064d6d..0dd87d6e4 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -271,6 +271,7 @@ These scopes are used for theming the editor 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 9343d55d4..839ebc213 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -94,6 +94,10 @@ impl EditorView { let text_annotations = view.text_annotations(doc, Some(theme)); let mut decorations = DecorationManager::default(); + if !(is_focused && self.terminal_focused) { + surface.set_style(area, theme.get("ui.background.inactive")) + } + if is_focused && config.cursorline { decorations.add_decoration(Self::cursorline(doc, view, theme)); }