aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/parsing
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/parsing')
-rw-r--r--crates/ra_syntax/src/parsing/reparsing.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/parsing/reparsing.rs b/crates/ra_syntax/src/parsing/reparsing.rs
index ba77a3b6c..b44cca49d 100644
--- a/crates/ra_syntax/src/parsing/reparsing.rs
+++ b/crates/ra_syntax/src/parsing/reparsing.rs
@@ -130,11 +130,11 @@ fn merge_errors(
130 if e.offset() <= old_node.range().start() { 130 if e.offset() <= old_node.range().start() {
131 res.push(e) 131 res.push(e)
132 } else if e.offset() >= old_node.range().end() { 132 } else if e.offset() >= old_node.range().end() {
133 res.push(e.add_offset(TextUnit::of_str(&edit.insert) - edit.delete.len())); 133 res.push(e.add_offset(TextUnit::of_str(&edit.insert), edit.delete.len()));
134 } 134 }
135 } 135 }
136 for e in new_errors { 136 for e in new_errors {
137 res.push(e.add_offset(old_node.range().start())); 137 res.push(e.add_offset(old_node.range().start(), 0.into()));
138 } 138 }
139 res 139 res
140} 140}