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.
This commit is contained in:
Nathan Sobo 2022-01-31 18:26:26 -07:00
parent 1d1f8df180
commit fde03b1b37

View file

@ -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,