aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_ide_api/src/extend_selection.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/extend_selection.rs b/crates/ra_ide_api/src/extend_selection.rs
index 33fefb541..602757e92 100644
--- a/crates/ra_ide_api/src/extend_selection.rs
+++ b/crates/ra_ide_api/src/extend_selection.rs
@@ -32,6 +32,7 @@ fn try_extend_selection(root: &SyntaxNode, range: TextRange) -> Option<TextRange
32 PARAM_LIST, 32 PARAM_LIST,
33 ARG_LIST, 33 ARG_LIST,
34 ARRAY_EXPR, 34 ARRAY_EXPR,
35 TUPLE_EXPR,
35 ]; 36 ];
36 37
37 if range.is_empty() { 38 if range.is_empty() {
@@ -245,6 +246,8 @@ mod tests {
245 do_check(r#"const FOO: [usize; 2] = [ 22 , 33<|>];"#, &["33", ", 33"]); 246 do_check(r#"const FOO: [usize; 2] = [ 22 , 33<|>];"#, &["33", ", 33"]);
246 do_check(r#"const FOO: [usize; 2] = [ 22 , 33<|> ,];"#, &["33", ", 33"]); 247 do_check(r#"const FOO: [usize; 2] = [ 22 , 33<|> ,];"#, &["33", ", 33"]);
247 248
249 do_check(r#"fn main() { (1, 2<|>) }"#, &["2", ", 2", "(1, 2)"]);
250
248 do_check( 251 do_check(
249 r#" 252 r#"
250const FOO: [usize; 2] = [ 253const FOO: [usize; 2] = [