Apply lsp edits in reverse order

This fixes the handling of multiple edits on the same line.
This commit is contained in:
Max Brunsfeld 2022-02-08 12:41:30 -08:00
parent 8bad05a4ba
commit a32dffdd2b

View file

@ -1554,7 +1554,7 @@ impl Buffer {
}
self.start_transaction();
for (range, new_text) in anchored_edits {
for (range, new_text) in anchored_edits.into_iter().rev() {
self.edit([range], new_text, cx);
}
self.end_transaction(cx);