aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorAnshul Dalal2023-08-08 00:13:10 +0000
committerGitHub2023-08-08 00:13:10 +0000
commitc7e9e94f007e04836d134cd3e53f71c38b7ba1ec (patch)
tree93aa3f5f1d20501bb705e092d4220a2bc81debbb /helix-term
parent7cda5b85920f875052438791f01246a408ee490e (diff)
Skip rendering gutters when gutter width exceeds view width (#7821)
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/ui/editor.rs21
1 files changed, 12 insertions, 9 deletions
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