Skip to content

Commit

Permalink
reload-all: Only update viewport when view focuses on the doc (#4901)
Browse files Browse the repository at this point in the history
  • Loading branch information
mangas authored Nov 26, 2022
1 parent fc81172 commit f0f295a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions helix-term/src/commands/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down

0 comments on commit f0f295a

Please sign in to comment.