mirror of
https://github.com/ilyakooo0/helix.git
synced 2025-01-07 15:30:02 +03:00
reload_all: Ensure view is synced with doc history before reload (#4965)
This commit is contained in:
parent
71a3a23f42
commit
8291654326
@ -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)?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user