From cec5d437d892767ccbc49cfcb20b4561ce24576d Mon Sep 17 00:00:00 2001 From: Grzegorz Baranski Date: Thu, 26 Aug 2021 19:48:33 +0200 Subject: fix: show current line number even if relative line is on (#656) --- helix-term/src/ui/editor.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'helix-term/src/ui/editor.rs') 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) }; -- cgit v1.2.3-70-g09d2