reload-all: Only update viewport when view focuses on the doc (#4901)
commitf0f295a6679655dccfab0c1e0e9bb4a87e351db5
authorFilipe Azevedo <filipe@azevedo.io>
dateSat 26 Nov 2022, 20:40 (4 years ago)
parentfc81172
helix-term/src/commands/typed.rs+3−2
@@ -1070,8 +1070,9 @@ fn reload_all(
10701070
10711071 for view_id in view_ids {
10721072 let view = view_mut!(cx.editor, view_id);
1073−
1074− view.ensure_cursor_in_view(doc, scrolloff);
1073+ if view.doc.eq(&doc_id) {
1074+ view.ensure_cursor_in_view(doc, scrolloff);
1075+ }
10751076 }
10761077 }
10771078