show newest options in jumplist picker first, fix docs (#10095)

* docs: mention `<space>g` changed file picker

* picker(jumplist): show jumps in order from latest to oldest
pull/10108/head
woojiq 8 months ago committed by GitHub
parent e63ed0579d
commit cc8290f393
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -280,7 +280,8 @@ This layer is a kludge of mappings, mostly pickers.
| `F` | Open file picker at current working directory | `file_picker_in_current_directory` |
| `b` | Open buffer picker | `buffer_picker` |
| `j` | Open jumplist picker | `jumplist_picker` |
| `g` | Debug (experimental) | N/A |
| `g` | Open changed file picker | `changed_file_picker` |
| `G` | Debug (experimental) | N/A |
| `k` | Show documentation for item under cursor in a [popup](#popup) (**LSP**) | `hover` |
| `s` | Open document symbol picker (**LSP**) | `symbol_picker` |
| `S` | Open workspace symbol picker (**LSP**) | `workspace_symbol_picker` |

@ -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(),

@ -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()
}

Loading…
Cancel
Save