Fix outline items navigation (#22890)

* Follows-up https://github.com/zed-industries/zed/pull/22224 , by
adjusting `impl PartialEq for OutlineEntryOutline` to compare outline
items' values too.
Before that, all outline items from the same excerpt were considered
equal.

Adds a test for this

* Stops re-revealing items in the outline panel, when it's focused: now,
when someone scrolls over outline panel items, there is no extra work
happening: the "revealed" item is the one scrolled to

Release Notes:

- Fixed outline items not scrolling properly
This commit is contained in:
Kirill Bulatov 2025-01-09 12:25:02 +02:00 committed by GitHub
parent af1a3cbaac
commit a0284a272b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 327 additions and 21 deletions

View file

@ -269,7 +269,7 @@ struct ExcerptIdMapping {
/// A range of text from a single [`Buffer`], to be shown as an [`Excerpt`].
/// These ranges are relative to the buffer itself
#[derive(Clone, Debug, Eq, PartialEq)]
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
pub struct ExcerptRange<T> {
/// The full range of text to be shown in the excerpt.
pub context: Range<T>,