From a05e09e9c514878148ddf26aa76d6b9183583d0f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 8 Oct 2018 17:33:13 +0300 Subject: Attach comments smartly --- crates/ra_editor/src/extend_selection.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'crates/ra_editor/src') diff --git a/crates/ra_editor/src/extend_selection.rs b/crates/ra_editor/src/extend_selection.rs index 6977900e6..e12346cb6 100644 --- a/crates/ra_editor/src/extend_selection.rs +++ b/crates/ra_editor/src/extend_selection.rs @@ -153,6 +153,22 @@ impl S { ); } + #[test] + fn test_extend_selection_doc_comments() { + do_check( + r#" +struct A; + +/// bla +/// bla +struct B { + <|> +} + "#, + &["\n \n", "{\n \n}", "/// bla\n/// bla\nstruct B {\n \n}"] + ) + } + #[test] fn test_extend_selection_comments() { do_check( -- cgit v1.2.3