on master help sign in
Sync all document changes on view focus
commit260341ed801a894141db2fd4e66c7159d06b665e authorMichael Davis <mcarsondavis@gmail.com> dateMon 28 Nov 2022, 09:36 (4 years ago) parent4802f26
1 file changed+6−3
helix-view/src/editor.rs+6−3
helix-view/src/editor.rs+6−3
@@ -1241,10 +1241,13 @@ impl Editor {
12411241 // within view
12421242 if prev_id != view_id {
12431243 self.mode = Mode::Normal;
1244− let view = view_mut!(self, view_id);
1245− let doc = doc_mut!(self, &view.doc);
1246− view.sync_changes(doc);
12471244 self.ensure_cursor_in_view(view_id);
1245+
1246+ // Update jumplist selections with new document changes.
1247+ for (view, _focused) in self.tree.views_mut() {
1248+ let doc = doc_mut!(self, &view.doc);
1249+ view.sync_changes(doc);
1250+ }
12481251 }
12491252 }
12501253