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:
parent
f4d1e7901c
commit
9f0b09007b
20 changed files with 641 additions and 642 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue