Start on a DiagnosticProvider
implementation for Rust
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
393009a05c
commit
a85e400b35
6 changed files with 138 additions and 10 deletions
|
@ -805,10 +805,13 @@ impl Buffer {
|
|||
}
|
||||
}
|
||||
|
||||
let start_overshoot = start - last_edit_old_end;
|
||||
start = last_edit_new_end;
|
||||
start.add_assign(&(start - last_edit_old_end));
|
||||
start.add_assign(&start_overshoot);
|
||||
|
||||
let end_overshoot = end - last_edit_old_end;
|
||||
end = last_edit_new_end;
|
||||
end.add_assign(&(end - last_edit_old_end));
|
||||
end.add_assign(&end_overshoot);
|
||||
}
|
||||
|
||||
let range = start.clip(Bias::Left, content)..end.clip(Bias::Right, content);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue