aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/editor.rs
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-28 11:59:26 +0000
committerDmitry Sharshakov2021-08-28 11:59:26 +0000
commite3153946311b189bd5e10e816acbdda508ded31c (patch)
tree304e0b8c0b869cc239d8c0ce9b0f328fe589bd93 /helix-term/src/ui/editor.rs
parent8df6739759396b45d06356dd78c39117590b062b (diff)
parentd6a9c2c0f6f4af98146b52d1c886a1ca99d15676 (diff)
Merge remote-tracking branch 'origin/master' into debug
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r--helix-term/src/ui/editor.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 1f4fc1c5..6428870e 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -508,7 +508,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)
};