diff options
author | Michael Davis | 2022-12-02 01:18:32 +0000 |
---|---|---|
committer | GitHub | 2022-12-02 01:18:32 +0000 |
commit | 8291654326e0e5ff14830bfade72178b622a9f3c (patch) | |
tree | 2d4bf76f7d2ef1b4086788ff5dc7ee713fcd08e1 | |
parent | 71a3a23f425bb562ab8cfede8f4220e8a7250242 (diff) |
reload_all: Ensure view is synced with doc history before reload (#4965)
-rw-r--r-- | helix-term/src/commands/typed.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 9f848efd..03fcaa55 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -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)?; |