aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorFlorian Diebold <[email protected]>2020-03-15 10:17:13 +0000
committerFlorian Diebold <[email protected]>2020-03-16 17:38:19 +0000
commitc32529ddd0d66a219226dd63da2d4b1825375c0e (patch)
tree060bf75bcd43d2bd1ed9519bf1030ca7f24c7af0 /crates/ra_ide
parent0f3a54dd4d439a6598526144c4ecccee9c5f1362 (diff)
Get tests working
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/completion/complete_dot.rs13
-rw-r--r--crates/ra_ide/src/completion/completion_context.rs2
2 files changed, 13 insertions, 2 deletions
diff --git a/crates/ra_ide/src/completion/complete_dot.rs b/crates/ra_ide/src/completion/complete_dot.rs
index 22f5077f5..82ec16913 100644
--- a/crates/ra_ide/src/completion/complete_dot.rs
+++ b/crates/ra_ide/src/completion/complete_dot.rs
@@ -720,7 +720,18 @@ mod tests {
720 } 720 }
721 ", 721 ",
722 ), 722 ),
723 @r###"[]"### 723 @r###"
724 [
725 CompletionItem {
726 label: "the_field",
727 source_range: [156; 156),
728 delete: [156; 156),
729 insert: "the_field",
730 kind: Field,
731 detail: "u32",
732 },
733 ]
734 "###
724 ); 735 );
725 } 736 }
726 737
diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs
index 3646fb8dc..54589a2a8 100644
--- a/crates/ra_ide/src/completion/completion_context.rs
+++ b/crates/ra_ide/src/completion/completion_context.rs
@@ -135,7 +135,7 @@ impl<'a> CompletionContext<'a> {
135 ), 135 ),
136 ) { 136 ) {
137 let new_offset = hypothetical_expansion.1.text_range().start(); 137 let new_offset = hypothetical_expansion.1.text_range().start();
138 if new_offset >= actual_expansion.text_range().end() { 138 if new_offset > actual_expansion.text_range().end() {
139 break; 139 break;
140 } 140 }
141 original_file = actual_expansion; 141 original_file = actual_expansion;