Skip to content

Commit

Permalink
Sync all document changes on view focus
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored and archseer committed Nov 29, 2022
1 parent 4802f26 commit 260341e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions helix-view/src/editor.rs
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit 260341e

Please sign in to comment.