Skip to content

Commit

Permalink
Fix outline items navigation (#22890)
Browse files Browse the repository at this point in the history
* Follows-up #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
  • Loading branch information
SomeoneToIgnore authored Jan 9, 2025
1 parent af1a3cb commit a0284a2
Show file tree
Hide file tree
Showing 2 changed files with 327 additions and 21 deletions.
2 changes: 1 addition & 1 deletion crates/multi_buffer/src/multi_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down
Loading

0 comments on commit a0284a2

Please sign in to comment.