on master help sign in
open: Use the correct function

Still not correct but at least it doesn't append at EOF

commit7366fe81e07dcfa965fe34539cf6036e44031990 authorBlaž Hrastnik <blaz@mxxn.io> dateThu 24 Jun 2021, 01:06 (5 years ago) parent4ad7b61
1 file changed+1−1
helix-term/src/commands.rs+1−1
helix-term/src/commands.rs+1−1
@@ -1826,7 +1826,7 @@ fn open(cx: &mut Context, open: Open) {
18261826 };
18271827
18281828 // insert newlines after this index for both Above and Below variants
1829− let line_end_index = rope_end_without_line_ending(&doc.text().slice(..));
1829+ let line_end_index = line_end_char_index(&doc.text().slice(..), line);
18301830
18311831 // TODO: share logic with insert_newline for indentation
18321832 let indent_level = indent::suggested_indent_for_pos(