Merge from vscode 5d18ad4c5902e3bddbc9f78da82dfc2ac349e908 (#9683)

This commit is contained in:
Anthony Dresser
2020-03-20 01:17:27 -07:00
committed by GitHub
parent 1520441b84
commit dd8fb9433b
89 changed files with 3095 additions and 445 deletions
+9 -4
View File
@@ -747,13 +747,13 @@ export class DiffReview extends Disposable {
let ariaLabel: string = '';
switch (type) {
case DiffEntryType.Equal:
ariaLabel = nls.localize('equalLine', "original {0}, modified {1}: {2}", originalLine, modifiedLine, lineContent);
ariaLabel = nls.localize('equalLine', "{0} original line {1} modified line {2}", lineContent, originalLine, modifiedLine);
break;
case DiffEntryType.Insert:
ariaLabel = nls.localize('insertLine', "+ modified {0}: {1}", modifiedLine, lineContent);
ariaLabel = nls.localize('insertLine', "+ {0} modified line {1}", lineContent, modifiedLine);
break;
case DiffEntryType.Delete:
ariaLabel = nls.localize('deleteLine', "- original {0}: {1}", originalLine, lineContent);
ariaLabel = nls.localize('deleteLine', "- {0} original line {1}", lineContent, originalLine);
break;
}
row.setAttribute('aria-label', ariaLabel);
@@ -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;
}
}