From b590504143412f185f02ee21a54ad4e6d966b257 Mon Sep 17 00:00:00 2001 From: gbaranski Date: Mon, 30 Aug 2021 20:28:40 +0200 Subject: fix: use head instead of anchor for relative line --- helix-term/src/ui/editor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index de0d065e..2c34ae96 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -427,7 +427,7 @@ impl EditorView { let current_line = doc .text() - .char_to_line(doc.selection(view.id).primary().anchor); + .char_to_line(doc.selection(view.id).primary().head); // it's used inside an iterator so the collect isn't needless: // https://github.com/rust-lang/rust-clippy/issues/6164 -- cgit v1.2.3-70-g09d2