Fix a typo in join_selections (#12452)
Co-authored-by: Rose Hogenson <rosehogenson@posteo.net>
This commit is contained in:
parent
917174e546
commit
931dd9c1dc
2 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue