on master help sign in
Sync all document changes on view focus
260341eMichael Davis
helix-view/src/editor.rs+6−3
@@ -1241,10 +1241,13 @@ impl Editor {
1241 // within view
1241 // within view
1242 if prev_id != view_id {
1242 if prev_id != view_id {
1243 self.mode = Mode::Normal;
1243 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);
1247 self.ensure_cursor_in_view(view_id);
1244 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+ }
1248 }
1251 }
1249 }
1252 }
1250
1253