diff options
author | Grzegorz Baranski | 2021-08-26 17:48:33 +0000 |
---|---|---|
committer | GitHub | 2021-08-26 17:48:33 +0000 |
commit | cec5d437d892767ccbc49cfcb20b4561ce24576d (patch) | |
tree | e8aa4707b0c7a38ba730ff359e09925ec6efb674 /helix-term/src | |
parent | 6192f2fa250e3aa10e514547c69ae901aebed657 (diff) |
fix: show current line number even if relative line is on (#656)
Diffstat (limited to 'helix-term/src')
-rw-r--r-- | helix-term/src/ui/editor.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 4da8bfd5..72b8adc1 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -462,7 +462,13 @@ impl EditorView { } else { let line = match config.line_number { LineNumber::Absolute => line + 1, - LineNumber::Relative => abs_diff(current_line, line), + LineNumber::Relative => { + if current_line == line { + line + 1 + } else { + abs_diff(current_line, line) + } + } }; format!("{:>5}", line) }; |