diff options
author | Blaž Hrastnik | 2021-06-23 16:35:36 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-23 16:35:36 +0000 |
commit | 0f55e67576ef6b9cd0c560100db43cb3023c5ef7 (patch) | |
tree | 0b28c88fe244c25d5397fd6803a771abeff14819 | |
parent | 7366fe81e07dcfa965fe34539cf6036e44031990 (diff) |
fix: ok, needs to be the end of the previous line
-rw-r--r-- | helix-term/src/commands.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 92b4971b..9e44d256 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 = line_end_char_index(&doc.text().slice(..), line); + let line_end_index = line_end_char_index(&doc.text().slice(..), line.saturating_sub(1)); // TODO: share logic with insert_newline for indentation let indent_level = indent::suggested_indent_for_pos( |