Rename LSP function and simplify tests (#27313)

While working on a fix I found opportunities to improve readability, but
it's a big rename diff, so I'm landing separately.

Release Notes:

- N/A
This commit is contained in:
João Marcos 2025-03-22 16:23:11 -03:00 committed by GitHub
parent f4d1e7901c
commit 9f0b09007b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 641 additions and 642 deletions

View file

@ -2160,8 +2160,10 @@ impl Buffer {
{
// Skip invalid edits and coalesce contiguous ones.
let mut edits: Vec<(Range<usize>, Arc<str>)> = Vec::new();
for (range, new_text) in edits_iter {
let mut range = range.start.to_offset(self)..range.end.to_offset(self);
if range.start > range.end {
mem::swap(&mut range.start, &mut range.end);
}