From 2709ce33324cf6d4612c61609f336cf5937b6cac Mon Sep 17 00:00:00 2001
From: Michael Davis <mcarsondavis@gmail.com>
Date: Sun, 27 Nov 2022 12:48:14 -0600
Subject: [PATCH] Sync changes with view in undo/redo/earlier/later

---
 helix-view/src/document.rs | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index 4b264b13..17503553 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -870,6 +870,8 @@ impl Document {
         if success {
             // reset changeset to fix len
             self.changes = ChangeSet::new(self.text());
+            // Sync with changes with the jumplist selections.
+            view.sync_changes(self);
         }
         success
     }
@@ -909,6 +911,8 @@ impl Document {
         if success {
             // reset changeset to fix len
             self.changes = ChangeSet::new(self.text());
+            // Sync with changes with the jumplist selections.
+            view.sync_changes(self);
         }
         success
     }