From 786148a1e10cb76a414b7dfcd8b595c56cd0fb84 Mon Sep 17 00:00:00 2001 From: Stephen Broadley Date: Sun, 4 Aug 2024 22:02:45 +0100 Subject: [PATCH] corrected 'split_centre_vertical' argument --- helix-term/src/ui/editor.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 4eb25935c..484ccf43c 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -95,8 +95,6 @@ impl EditorView { if config.nullspace.enable { if inner.width < view.area.width { - let (null_l, _, null_r) = area.clip_bottom(1).split_centre_vertical(inner.width); - let null_style = theme .try_get("ui.nullspace") .or_else(|| Some(theme.get("ui.linenr"))) @@ -112,6 +110,9 @@ impl EditorView { } } + let view_width = inner.width + view.gutter_offset(doc); + let (null_l, _, null_r) = area.clip_bottom(1).split_centre_vertical(view_width); + // We currently on use the first char in the 'pattern' // but in future I would like to use the whole string // to render nicer patterns.