Don't open a multibuffer when code actions's edits are contained in the current editor

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-02-10 09:55:21 -08:00
parent 5049c1b286
commit 424b35253a
3 changed files with 58 additions and 5 deletions

View file

@ -191,7 +191,7 @@ impl ProjectDiagnosticsEditor {
for selection in editor.local_selections::<usize>(cx) {
for (buffer, mut range) in
excerpts.excerpted_buffers(selection.start..selection.end, cx)
excerpts.range_to_buffer_ranges(selection.start..selection.end, cx)
{
if selection.reversed {
mem::swap(&mut range.start, &mut range.end);