Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TornaxO7 committed Dec 8, 2024
1 parent fc9968b commit 8e0add1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3509,12 +3509,22 @@ fn open(cx: &mut Context, open: Open) {

let indent_len = indent.len();
let mut text = String::with_capacity(1 + indent_len);

if Open::Above == open {
if let Some(token) = continue_comment_token {
text.push_str(token);
text.push(' ');
}
}

text.push_str(doc.line_ending.as_str());
text.push_str(&indent);

if let Some(token) = continue_comment_token {
text.push_str(token);
text.push(' ');
if Open::Below == open {
if let Some(token) = continue_comment_token {
text.push_str(token);
text.push(' ');
}
}

let text = text.repeat(count);
Expand Down

0 comments on commit 8e0add1

Please sign in to comment.