Make the anchor range inclusive on completions

Nathan Sobo created

This will help us to correctly interpolate the replacement range when we confirm before receiving new completions after typing with a completion open.

Change summary

crates/language/src/buffer.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/language/src/buffer.rs 🔗

@@ -1758,7 +1758,7 @@ impl Buffer {
                             },
                         };
 
-                        let old_range = this.anchor_after(old_range.start)..this.anchor_before(old_range.end);
+                        let old_range = this.anchor_before(old_range.start)..this.anchor_after(old_range.end);
     
                         Some(Completion {
                             old_range,