提交 3bb6de78 编写于 作者: R Rob Lourens 提交者: GitHub

Merge pull request #34491 from KuromiAK/acao/search-aria

Improve search aria label generation performance
......@@ -324,12 +324,12 @@ export class SearchAccessibilityProvider implements IAccessibilityProvider {
const match = <Match>element;
const searchModel: SearchModel = (<SearchResult>tree.getInput()).searchModel;
const replace = searchModel.isReplaceActive() && !!searchModel.replaceString;
const preview = match.preview();
const matchString = match.getMatchString();
const range = match.range();
if (replace) {
return nls.localize('replacePreviewResultAria', "Replace term {0} with {1} at column position {2} in line with text {3}", preview.inside, match.replaceString, range.startColumn + 1, match.text());
return nls.localize('replacePreviewResultAria', "Replace term {0} with {1} at column position {2} in line with text {3}", matchString, match.replaceString, range.startColumn + 1, match.text());
}
return nls.localize('searchResultAria', "Found term {0} at column position {1} in line with text {2}", preview.inside, range.startColumn + 1, match.text());
return nls.localize('searchResultAria', "Found term {0} at column position {1} in line with text {2}", matchString, range.startColumn + 1, match.text());
}
return undefined;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册