From 3be98f2ac93b278828e76eb813bdd8033f647b12 Mon Sep 17 00:00:00 2001 From: robojumper Date: Sat, 9 Feb 2019 00:34:05 +0100 Subject: Add tests for action target ranges --- crates/ra_assists/src/fill_match_arms.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'crates/ra_assists/src/fill_match_arms.rs') diff --git a/crates/ra_assists/src/fill_match_arms.rs b/crates/ra_assists/src/fill_match_arms.rs index 741f75e2a..69b535a27 100644 --- a/crates/ra_assists/src/fill_match_arms.rs +++ b/crates/ra_assists/src/fill_match_arms.rs @@ -65,6 +65,7 @@ pub(crate) fn fill_match_arms(ctx: AssistCtx) -> Option (),\n"); } buf.push_str("}"); + edit.target(match_expr.syntax().range()); edit.set_cursor(expr.syntax().range().start()); edit.replace_node_and_indent(match_expr.syntax(), buf); }) @@ -72,7 +73,7 @@ pub(crate) fn fill_match_arms(ctx: AssistCtx) -> Option {} + } + "#, + "match E::X {}", + ); + } } -- cgit v1.2.3