Skip to content

Commit

Permalink
diff view: go to next, go to previosu should also work when focus is …
Browse files Browse the repository at this point in the history
…not in editor

microsoft#88695
  • Loading branch information
isidorn committed Mar 19, 2020
1 parent c8781c6 commit e2b5a54
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/vs/editor/browser/widget/diffReview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -869,9 +869,14 @@ class DiffReviewPrev extends EditorAction {
function findFocusedDiffEditor(accessor: ServicesAccessor): DiffEditorWidget | null {
const codeEditorService = accessor.get(ICodeEditorService);
const diffEditors = codeEditorService.listDiffEditors();
const activeCodeEditor = codeEditorService.getActiveCodeEditor();
if (!activeCodeEditor) {
return null;
}

for (let i = 0, len = diffEditors.length; i < len; i++) {
const diffEditor = <DiffEditorWidget>diffEditors[i];
if (diffEditor.hasWidgetFocus()) {
if (diffEditor.getModifiedEditor().getId() === activeCodeEditor.getId() || diffEditor.getOriginalEditor().getId() === activeCodeEditor.getId()) {
return diffEditor;
}
}
Expand Down

0 comments on commit e2b5a54

Please sign in to comment.