diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 475f14d1d..351692fd2 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -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); + } } }