Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide_assists/src/handlers/replace_if_let_with_match.rs')
| -rw-r--r-- | crates/ide_assists/src/handlers/replace_if_let_with_match.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide_assists/src/handlers/replace_if_let_with_match.rs b/crates/ide_assists/src/handlers/replace_if_let_with_match.rs index 8aad3e2f52..4d5262646c 100644 --- a/crates/ide_assists/src/handlers/replace_if_let_with_match.rs +++ b/crates/ide_assists/src/handlers/replace_if_let_with_match.rs @@ -48,7 +48,7 @@ pub(crate) fn replace_if_let_with_match(acc: &mut Assists, ctx: &AssistContext) if_expr.syntax().text_range().start(), if_expr.then_branch()?.syntax().text_range().start(), ); - let cursor_in_range = available_range.contains_range(ctx.frange.range); + let cursor_in_range = available_range.contains_range(ctx.selection_trimmed()); if !cursor_in_range { return None; } |