summaryrefslogtreecommitdiff
path: root/helix-view/src/gutter.rs
diff options
context:
space:
mode:
authorIvan Tham2022-07-18 01:13:47 +0000
committerGitHub2022-07-18 01:13:47 +0000
commite8214fb1e6009d44a4b7094c6e5297a19f18f549 (patch)
tree1dc2dc1b15f3ed675dd7fed78632b2a0a08bccee /helix-view/src/gutter.rs
parent2a8d38c27bce34c9b6fa95a2fb063fe097e220d4 (diff)
Make gutters padding optional (#2996)
If all gutters are removed, there are still an extra one padding, would be nice to remove that to save some space.
Diffstat (limited to 'helix-view/src/gutter.rs')
-rw-r--r--helix-view/src/gutter.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/helix-view/src/gutter.rs b/helix-view/src/gutter.rs
index 05fec758..8f7c3062 100644
--- a/helix-view/src/gutter.rs
+++ b/helix-view/src/gutter.rs
@@ -102,6 +102,17 @@ pub fn line_numbers<'doc>(
})
}
+pub fn padding<'doc>(
+ _editor: &'doc Editor,
+ _doc: &'doc Document,
+ _view: &View,
+ _theme: &Theme,
+ _is_focused: bool,
+ _width: usize,
+) -> GutterFn<'doc> {
+ Box::new(|_line: usize, _selected: bool, _out: &mut String| None)
+}
+
#[inline(always)]
const fn abs_diff(a: usize, b: usize) -> usize {
if a > b {