reload-all: Only update viewport when view focuses on the doc (#4901)

This commit is contained in:
Filipe Azevedo 2022-11-26 20:40:43 +00:00 committed by GitHub
parent fc811726e0
commit f0f295a667
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1070,8 +1070,9 @@ fn reload_all(
for view_id in view_ids {
let view = view_mut!(cx.editor, view_id);
view.ensure_cursor_in_view(doc, scrolloff);
if view.doc.eq(&doc_id) {
view.ensure_cursor_in_view(doc, scrolloff);
}
}
}