Skip to content

Commit

Permalink
reload_all: Ensure view is synced with doc history before reload (hel…
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored and Shekhinah Memmel committed Dec 11, 2022
1 parent e30173c commit 6ed030c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helix-term/src/commands/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,10 @@ fn reload_all(

// Every doc is guaranteed to have at least 1 view at this point.
let view = view_mut!(cx.editor, view_ids[0]);

// Ensure that the view is synced with the document's history.
view.sync_changes(doc);

let redraw_handle = cx.editor.redraw_handle.clone();
doc.reload(view, &cx.editor.diff_providers, redraw_handle)?;

Expand Down

0 comments on commit 6ed030c

Please sign in to comment.