aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-08 15:33:13 +0100
committerAleksey Kladov <[email protected]>2018-10-08 15:36:38 +0100
commita05e09e9c514878148ddf26aa76d6b9183583d0f (patch)
treef9d1d3baaa8aead60d356f0e60ca8f5e0fdcd308 /crates/ra_editor/src
parentb642e6c6451b21d9b3fc719472a1802ea70a83d8 (diff)
Attach comments smartly
Diffstat (limited to 'crates/ra_editor/src')
-rw-r--r--crates/ra_editor/src/extend_selection.rs16
1 files changed, 16 insertions, 0 deletions
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
@@ -154,6 +154,22 @@ impl S {
154 } 154 }
155 155
156 #[test] 156 #[test]
157 fn test_extend_selection_doc_comments() {
158 do_check(
159 r#"
160struct A;
161
162/// bla
163/// bla
164struct B {
165 <|>
166}
167 "#,
168 &["\n \n", "{\n \n}", "/// bla\n/// bla\nstruct B {\n \n}"]
169 )
170 }
171
172 #[test]
157 fn test_extend_selection_comments() { 173 fn test_extend_selection_comments() {
158 do_check( 174 do_check(
159 r#" 175 r#"