diff options
author | Michael Davis | 2022-11-28 15:36:41 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-11-29 16:15:20 +0000 |
commit | 260341ed801a894141db2fd4e66c7159d06b665e (patch) | |
tree | 763ff5361f05b86316b3b3abcaa0bf93a48c792f /helix-view/src | |
parent | 4802f26a232b2eed5f4af05a540a4735edd199ee (diff) |
Sync all document changes on view focus
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/editor.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index e54c7497..5a1ac6b1 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -1241,10 +1241,13 @@ impl Editor { // within view if prev_id != view_id { self.mode = Mode::Normal; - let view = view_mut!(self, view_id); - let doc = doc_mut!(self, &view.doc); - view.sync_changes(doc); self.ensure_cursor_in_view(view_id); + + // Update jumplist selections with new document changes. + for (view, _focused) in self.tree.views_mut() { + let doc = doc_mut!(self, &view.doc); + view.sync_changes(doc); + } } } |