From fde03b1b37a9a8232ee5a4c71a29c7e5adf849f3 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 31 Jan 2022 18:26:26 -0700 Subject: [PATCH] Make the anchor range inclusive on completions This will help us to correctly interpolate the replacement range when we confirm before receiving new completions after typing with a completion open. --- crates/language/src/buffer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/language/src/buffer.rs b/crates/language/src/buffer.rs index a8a642920c..446bd60b87 100644 --- a/crates/language/src/buffer.rs +++ b/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,