Archived
Merge from vscode 5d18ad4c5902e3bddbc9f78da82dfc2ac349e908 (#9683)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user