reintroduce ensure_cursor_in_view in handle_config_events

since we sorted out the borrow checker issues using partial borrows,
there's nothing stopping us from going back to the simpler implementation
pull/10559/head
Ingrid 2 months ago
parent 6e03974650
commit 6494301e3c

@ -384,9 +384,7 @@ impl Application {
let scrolloff = self.editor.config().scrolloff;
for (view, _) in self.editor.tree.views() {
let doc = doc_mut!(self.editor, &view.doc);
if let Some(offset) = view.offset_coords_to_in_view_center::<false>(doc, scrolloff) {
doc.view_data_mut(view.id).view_position = offset
}
view.ensure_cursor_in_view(doc, scrolloff);
}
}

Loading…
Cancel
Save