Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--helix-term/src/commands.rs2
-rw-r--r--helix-term/tests/test/commands.rs8
2 files changed, 9 insertions, 1 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 3c93ae7f..3b906487 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -4780,7 +4780,7 @@ fn join_selections_impl(cx: &mut Context, select_space: bool) {
changes.reserve(lines.len());
let first_line_idx = slice.line_to_char(start);
- let first_line_idx = skip_while(slice, first_line_idx, |ch| matches!(ch, ' ' | 't'))
+ let first_line_idx = skip_while(slice, first_line_idx, |ch| matches!(ch, ' ' | '\t'))
.unwrap_or(first_line_idx);
let first_line = slice.slice(first_line_idx..);
let mut current_comment_token = comment_tokens
diff --git a/helix-term/tests/test/commands.rs b/helix-term/tests/test/commands.rs
index 32badaa4..3e2d4b52 100644
--- a/helix-term/tests/test/commands.rs
+++ b/helix-term/tests/test/commands.rs
@@ -665,6 +665,14 @@ async fn test_join_selections_comment() -> anyhow::Result<()> {
))
.await?;
+ test((
+ "#[|\t// Join comments
+\t// with indent]#",
+ ":lang go<ret>J",
+ "#[|\t// Join comments with indent]#",
+ ))
+ .await?;
+
Ok(())
}