Skip to content

Commit

Permalink
reload-all: Only update viewport when view focuses on the doc (helix-…
Browse files Browse the repository at this point in the history
  • Loading branch information
mangas authored and Frederik Vestre committed Feb 6, 2023
1 parent 25ae9b1 commit 08b5fee
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 08b5fee

Please sign in to comment.