Skip to content

Commit

Permalink
picker(jumplist): show jumps in order from latest to oldest
Browse files Browse the repository at this point in the history
  • Loading branch information
woojiq committed Apr 2, 2024
1 parent 27fff9c commit ba0a3a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2980,6 +2980,7 @@ fn jumplist_picker(cx: &mut Context) {
.flat_map(|(view, _)| {
view.jumps
.iter()
.rev()
.map(|(doc_id, selection)| new_meta(view, *doc_id, selection.clone()))
})
.collect(),
Expand Down
2 changes: 1 addition & 1 deletion helix-view/src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl JumpList {
self.jumps.retain(|(other_id, _)| other_id != doc_id);
}

pub fn iter(&self) -> impl Iterator<Item = &Jump> {
pub fn iter(&self) -> impl DoubleEndedIterator<Item = &Jump> {
self.jumps.iter()
}

Expand Down

0 comments on commit ba0a3a7

Please sign in to comment.