Skip to content

Commit 69523cc

Browse files
committed
Auto merge of #17552 - Veykril:fn-param-comp-fix, r=Veykril
fix: Fix parameter completions using macro expanded source ranges Fixes #17550
2 parents 8c2adec + 8f27046 commit 69523cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/ide-completion/src/completions/fn_param.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ fn should_add_self_completions(
173173
}
174174

175175
fn comma_wrapper(ctx: &CompletionContext<'_>) -> Option<(impl Fn(&str) -> String, TextRange)> {
176-
let param = ctx.token.parent_ancestors().find(|node| node.kind() == SyntaxKind::PARAM)?;
176+
let param =
177+
ctx.original_token.parent_ancestors().find(|node| node.kind() == SyntaxKind::PARAM)?;
177178

178179
let next_token_kind = {
179180
let t = param.last_token()?.next_token()?;

0 commit comments

Comments
 (0)