Skip to content

Commit

Permalink
Fix #17255
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed May 12, 2017
1 parent a855190 commit 839e9af
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/vs/workbench/parts/search/browser/searchResultsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,15 @@ export class SearchAccessibilityProvider implements IAccessibilityProvider {
}

if (element instanceof Match) {
let match = <Match>element;
let input = <SearchResult>tree.getInput();
if (input.searchModel.isReplaceActive()) {
let preview = match.preview();
return nls.localize('replacePreviewResultAria', "Replace preview result, {0}", preview.before + match.replaceString + preview.after);
const match = <Match>element;
const searchModel: SearchModel = (<SearchResult>tree.getInput()).searchModel;
const replace = searchModel.isReplaceActive() && !!searchModel.replaceString;
const preview = match.preview();
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('searchResultAria', "{0}, Search result", 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 undefined;
}
Expand Down

0 comments on commit 839e9af

Please sign in to comment.