aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r--helix-term/src/commands/typed.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 475f14d1..351692fd 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);
+ }
}
}