From e8214fb1e6009d44a4b7094c6e5297a19f18f549 Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Mon, 18 Jul 2022 09:13:47 +0800 Subject: 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.--- helix-term/src/ui/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-term/src') diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 9b8bf8eb..911ee0f0 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -615,7 +615,7 @@ impl EditorView { // avoid lots of small allocations by reusing a text buffer for each line let mut text = String::with_capacity(8); - for (constructor, width) in &view.gutters { + for (constructor, width) in view.gutters() { let gutter = constructor(editor, doc, view, theme, is_focused, *width); text.reserve(*width); // ensure there's enough space for the gutter for (i, line) in (view.offset.row..(last_line + 1)).enumerate() { -- cgit v1.2.3-70-g09d2