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,10 +1070,11 @@ fn reload_all(
for view_id in view_ids { for view_id in view_ids {
let view = view_mut!(cx.editor, view_id); let view = view_mut!(cx.editor, view_id);
if view.doc.eq(&doc_id) {
view.ensure_cursor_in_view(doc, scrolloff); view.ensure_cursor_in_view(doc, scrolloff);
} }
} }
}
Ok(()) Ok(())
} }