fix: use head instead of anchor for relative line
commitb590504143412f185f02ee21a54ad4e6d966b257
authorgbaranski <root@gbaranski.com>
dateMon 30 Aug 2021, 20:28 (5 years ago)
parent4f8dc4c
helix-term/src/ui/editor.rs+1−1
@@ -427,7 +427,7 @@ impl EditorView {
427427
428428 let current_line = doc
429429 .text()
430− .char_to_line(doc.selection(view.id).primary().anchor);
430+ .char_to_line(doc.selection(view.id).primary().head);
431431
432432 // it's used inside an iterator so the collect isn't needless:
433433 // https://github.com/rust-lang/rust-clippy/issues/6164