From c7e9e94f007e04836d134cd3e53f71c38b7ba1ec Mon Sep 17 00:00:00 2001 From: Anshul Dalal Date: Tue, 8 Aug 2023 05:43:10 +0530 Subject: Skip rendering gutters when gutter width exceeds view width (#7821) --- helix-term/src/ui/editor.rs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'helix-term') diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 5b5cda93..aa159d40 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -163,15 +163,18 @@ impl EditorView { Box::new(highlights) }; - Self::render_gutter( - editor, - doc, - view, - view.area, - theme, - is_focused, - &mut line_decorations, - ); + let gutter_overflow = view.gutter_offset(doc) == 0; + if !gutter_overflow { + Self::render_gutter( + editor, + doc, + view, + view.area, + theme, + is_focused, + &mut line_decorations, + ); + } if is_focused { let cursor = doc -- cgit v1.2.3-70-g09d2