aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-06-23 16:06:17 +0000
committerBlaž Hrastnik2021-06-23 16:06:17 +0000
commit7366fe81e07dcfa965fe34539cf6036e44031990 (patch)
tree511ced0891edcceb6d8bd267bd5448882eed7994 /helix-term/src
parent4ad7b61c695b9e4fb195258b80f184759ad6560e (diff)
open: Use the correct function
Still not correct but at least it doesn't append at EOF
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/commands.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 8f36a666..92b4971b 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -1826,7 +1826,7 @@ fn open(cx: &mut Context, open: Open) {
};
// insert newlines after this index for both Above and Below variants
- let line_end_index = rope_end_without_line_ending(&doc.text().slice(..));
+ let line_end_index = line_end_char_index(&doc.text().slice(..), line);
// TODO: share logic with insert_newline for indentation
let indent_level = indent::suggested_indent_for_pos(