mirror of
https://github.com/ilyakooo0/helix.git
synced 2024-12-01 19:58:12 +03:00
fix: show current line number even if relative line is on (#656)
This commit is contained in:
parent
6192f2fa25
commit
cec5d437d8
@ -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…
Reference in New Issue
Block a user