aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsfoNL2023-04-11 22:59:08 +0000
committerGitHub2023-04-11 22:59:08 +0000
commit2f82bc13e87ded654f933d1751063da889bac7c7 (patch)
treedfd80ef1b5080e5574b3bedd43a1aa0d01bb0c07
parentb9b4ed5c6c68e8c2c744e779b5c4d1c148a60f47 (diff)
Fix crash on opening jumplist (#6672)
Co-authored-by: Esra Fokker <esra.fokker@finalist.nl>
-rw-r--r--helix-term/src/commands.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 17669924..95310c1f 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -2547,6 +2547,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| {