Skip to content

Commit 8291654

Browse files
reload_all: Ensure view is synced with doc history before reload (#4965)
1 parent 71a3a23 commit 8291654

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

helix-term/src/commands/typed.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)