fix: show current line number even if relative line is on (#656)

imgbot
Grzegorz Baranski 3 years ago committed by GitHub
parent 6192f2fa25
commit cec5d437d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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)
};

Loading…
Cancel
Save