on master help sign in
reload_all: Ensure view is synced with doc history before reload (#4965)
commit8291654326e0e5ff14830bfade72178b622a9f3c authorMichael Davis <mcarsondavis@gmail.com> dateThu 1 Dec 2022, 19:18 (4 years ago) parent71a3a23
1 file changed+4
helix-term/src/commands/typed.rs+4
helix-term/src/commands/typed.rs+4
@@ -1068,6 +1068,10 @@ fn reload_all(
10681068
10691069 // Every doc is guaranteed to have at least 1 view at this point.
10701070 let view = view_mut!(cx.editor, view_ids[0]);
1071+
1072+ // Ensure that the view is synced with the document's history.
1073+ view.sync_changes(doc);
1074+
10711075 let redraw_handle = cx.editor.redraw_handle.clone();
10721076 doc.reload(view, &cx.editor.diff_providers, redraw_handle)?;
10731077