on master help sign in
Fix crash on opening jumplist (#6672)

Co-authored-by: Esra Fokker <esra.fokker@finalist.nl>

commit2f82bc13e87ded654f933d1751063da889bac7c7 authorEsfoNL <59415349+EsfoNL@users.noreply.github.com> dateWed 12 Apr 2023, 00:59 (4 years ago) parentb9b4ed5
1 file changed+7
helix-term/src/commands.rs+7
helix-term/src/commands.rs+7
@@ -2547,6 +2547,13 @@ fn jumplist_picker(cx: &mut Context) {
25472547 }
25482548 }
25492549
2550+ for (view, _) in cx.editor.tree.views_mut() {
2551+ for doc_id in view.jumps.iter().map(|e| e.0).collect::<Vec<_>>().iter() {
2552+ let doc = doc_mut!(cx.editor, doc_id);
2553+ view.sync_changes(doc);
2554+ }
2555+ }
2556+
25502557 let new_meta = |view: &View, doc_id: DocumentId, selection: Selection| {
25512558 let doc = &cx.editor.documents.get(&doc_id);
25522559 let text = doc.map_or("".into(), |d| {