summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-12-13 15:52:15 +0000
committerBlaž Hrastnik2021-12-13 15:52:15 +0000
commit730d3be2010adbd2c43b7cdf1a256a15ef97e3f2 (patch)
treeb1748024d2ecd98f52912ce983a2ff03e79476a3
parentc7ace15fd4cf6794782aca0927ff4d43fffbd473 (diff)
Add ui.gutter to theme all gutters (i.e. set bg)
-rw-r--r--helix-term/src/ui/editor.rs4
-rw-r--r--helix-view/src/editor.rs2
2 files changed, 4 insertions, 2 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index bac1f171..c5b43898 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -425,6 +425,8 @@ impl EditorView {
let mut offset = 0;
+ let gutter_style = theme.get("ui.gutter");
+
// avoid lots of small allocations by reusing a text buffer for each line
let mut text = String::with_capacity(8);
@@ -440,7 +442,7 @@ impl EditorView {
viewport.y + i as u16,
&text,
*width,
- style,
+ gutter_style.patch(style),
);
}
text.clear();
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 753defa1..fd6eb4d5 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -20,7 +20,7 @@ use std::{
use tokio::time::{sleep, Duration, Instant, Sleep};
-use anyhow::{bail, Context, Error};
+use anyhow::{bail, Error};
pub use helix_core::diagnostic::Severity;
pub use helix_core::register::Registers;