提交 e2b5a548 编写于 作者: I isidor

diff view: go to next, go to previosu should also work when focus is not in editor

#88695
上级 c8781c6f
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册