Make rename highlights work across multibuffer excerpts

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Keith Simmons 2022-03-24 10:22:47 -07:00
parent ff4bdb3114
commit f6805eb802
9 changed files with 110 additions and 45 deletions

View file

@ -187,10 +187,10 @@ impl DiagnosticEntry<Anchor> {
impl Default for Summary {
fn default() -> Self {
Self {
start: Anchor::min(),
end: Anchor::max(),
min_start: Anchor::max(),
max_end: Anchor::min(),
start: Anchor::build_min(),
end: Anchor::build_max(),
min_start: Anchor::build_max(),
max_end: Anchor::build_min(),
count: 0,
}
}

View file

@ -789,7 +789,7 @@ fn test_random_collaboration(cx: &mut MutableAppContext, mut rng: StdRng) {
for buffer in &buffers {
let buffer = buffer.read(cx).snapshot();
let actual_remote_selections = buffer
.remote_selections_in_range(Anchor::min()..Anchor::max())
.remote_selections_in_range(Anchor::build_min()..Anchor::build_max())
.map(|(replica_id, selections)| (replica_id, selections.collect::<Vec<_>>()))
.collect::<Vec<_>>();
let expected_remote_selections = active_selections