From 8d65530843749e566655b7347b49a1debdc7d948 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 9 Oct 2019 11:26:09 +0300 Subject: extend selection correctly handles commas in tuples --- crates/ra_ide_api/src/extend_selection.rs | 3 +++ 1 file changed, 3 insertions(+) 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];"#, &["33", ", 33"]); do_check(r#"const FOO: [usize; 2] = [ 22 , 33<|> ,];"#, &["33", ", 33"]); + do_check(r#"fn main() { (1, 2<|>) }"#, &["2", ", 2", "(1, 2)"]); + do_check( r#" const FOO: [usize; 2] = [ -- cgit v1.2.3