fix: show current line number even if relative line is on (#656)
This commit is contained in:
parent
6192f2fa25
commit
cec5d437d8
1 changed files with 7 additions and 1 deletions
|
@ -462,7 +462,13 @@ impl EditorView {
|
||||||
} else {
|
} else {
|
||||||
let line = match config.line_number {
|
let line = match config.line_number {
|
||||||
LineNumber::Absolute => line + 1,
|
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)
|
format!("{:>5}", line)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue