Skip to content

Commit

Permalink
Fix crash on opening jumplist (helix-editor#6672)
Browse files Browse the repository at this point in the history
Co-authored-by: Esra Fokker <[email protected]>
  • Loading branch information
2 people authored and Schuyler Mortimer committed Jul 10, 2024
1 parent e06eca5 commit 67ba4d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2549,6 +2549,13 @@ fn jumplist_picker(cx: &mut Context) {
}
}

for (view, _) in cx.editor.tree.views_mut() {
for doc_id in view.jumps.iter().map(|e| e.0).collect::<Vec<_>>().iter() {
let doc = doc_mut!(cx.editor, doc_id);
view.sync_changes(doc);
}
}

let new_meta = |view: &View, doc_id: DocumentId, selection: Selection| {
let doc = &cx.editor.documents.get(&doc_id);
let text = doc.map_or("".into(), |d| {
Expand Down

0 comments on commit 67ba4d6

Please sign in to comment.