diff options
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/editor.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/helix-term/src/editor.rs b/helix-term/src/editor.rs index 131c285e..a3d6a04e 100644 --- a/helix-term/src/editor.rs +++ b/helix-term/src/editor.rs @@ -209,12 +209,11 @@ impl Editor { } } - let mut line = 0; let style: Style = view.theme.get("ui.linenr").into(); - for i in view.first_line..(last_line as u16) { + for (i, line) in (view.first_line..(last_line as u16)).enumerate() { self.surface - .set_stringn(0, line, format!("{:>5}", i + 1), 5, style); // lavender - line += 1; + .set_stringn(0, line, format!("{:>5}", i + 1), 5, style); + // lavender } // let lines = state |