mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
fix #193500
This commit is contained in:
@@ -43,6 +43,7 @@ import { CommentContextKeys } from 'vs/workbench/contrib/comments/common/comment
|
|||||||
import { AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
import { AccessibilityVerbositySettingId } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
|
||||||
import { AccessibilityCommandId } from 'vs/workbench/contrib/accessibility/common/accessibilityCommands';
|
import { AccessibilityCommandId } from 'vs/workbench/contrib/accessibility/common/accessibilityCommands';
|
||||||
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
||||||
|
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
||||||
|
|
||||||
export const ID = 'editor.contrib.review';
|
export const ID = 'editor.contrib.review';
|
||||||
|
|
||||||
@@ -384,7 +385,8 @@ export class CommentController implements IEditorContribution {
|
|||||||
@IConfigurationService private readonly configurationService: IConfigurationService,
|
@IConfigurationService private readonly configurationService: IConfigurationService,
|
||||||
@IContextKeyService contextKeyService: IContextKeyService,
|
@IContextKeyService contextKeyService: IContextKeyService,
|
||||||
@IEditorService private readonly editorService: IEditorService,
|
@IEditorService private readonly editorService: IEditorService,
|
||||||
@IKeybindingService private readonly keybindingService: IKeybindingService
|
@IKeybindingService private readonly keybindingService: IKeybindingService,
|
||||||
|
@IAccessibilityService private readonly accessibilityService: IAccessibilityService
|
||||||
) {
|
) {
|
||||||
this._commentInfos = [];
|
this._commentInfos = [];
|
||||||
this._commentWidgets = [];
|
this._commentWidgets = [];
|
||||||
@@ -725,6 +727,14 @@ export class CommentController implements IEditorContribution {
|
|||||||
this.editor.setPosition(position);
|
this.editor.setPosition(position);
|
||||||
this.editor.revealLineInCenterIfOutsideViewport(position.lineNumber);
|
this.editor.revealLineInCenterIfOutsideViewport(position.lineNumber);
|
||||||
}
|
}
|
||||||
|
if (this.accessibilityService.isScreenReaderOptimized()) {
|
||||||
|
const commentRangeStart = range?.getStartPosition().lineNumber;
|
||||||
|
const commentRangeEnd = range?.getEndPosition().lineNumber;
|
||||||
|
if (commentRangeStart && commentRangeEnd) {
|
||||||
|
const oneLine = commentRangeStart === commentRangeEnd;
|
||||||
|
oneLine ? status(nls.localize('commentRange', "Line {0}", commentRangeStart)) : status(nls.localize('commentRangeStart', "Lines {0} to {1}", commentRangeStart, commentRangeEnd));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public nextCommentingRange(): void {
|
public nextCommentingRange(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user