diff options
author | Filipe Azevedo | 2022-11-26 20:40:43 +0000 |
---|---|---|
committer | GitHub | 2022-11-26 20:40:43 +0000 |
commit | f0f295a6679655dccfab0c1e0e9bb4a87e351db5 (patch) | |
tree | d9a6276fa342921bfcea951aa167617e13d23abc /helix-term/src/commands | |
parent | fc811726e0e74dd6597f1ebbbd095901b8a78a3e (diff) |
reload-all: Only update viewport when view focuses on the doc (#4901)
Diffstat (limited to 'helix-term/src/commands')
-rw-r--r-- | helix-term/src/commands/typed.rs | 5 |
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); + } } } |