提交 d2915a16 编写于 作者: R Rob Lourens

Strict null check more search files

上级 c91cdedd
......@@ -655,14 +655,18 @@
"./vs/workbench/services/part/common/partService.ts",
"./vs/workbench/services/scm/common/scm.ts",
"./vs/workbench/services/scm/common/scmService.ts",
"./vs/platform/search/test/common/replace.test.ts",
"./vs/workbench/services/search/common/searchHelpers.ts",
"./vs/workbench/services/search/node/fileSearchManager.ts",
"./vs/workbench/services/search/node/legacy/search.ts",
"./vs/workbench/services/search/node/ripgrepSearchUtils.ts",
"./vs/workbench/services/search/node/ripgrepTextSearchEngine.ts",
"./vs/workbench/services/search/test/node/ripgrepTextSearchEngine.test.ts",
"./vs/workbench/services/search/node/search.ts",
"./vs/workbench/services/search/node/searchHistoryService.ts",
"./vs/workbench/services/search/node/searchIpc.ts",
"./vs/workbench/services/search/node/textSearchManager.ts",
"./vs/workbench/services/search/test/node/textSearchManager.test.ts",
"./vs/workbench/services/textMate/electron-browser/TMGrammars.ts",
"./vs/workbench/services/textMate/electron-browser/TMHelper.ts",
"./vs/workbench/services/textMate/electron-browser/textMateService.ts",
......
......@@ -257,7 +257,7 @@ export class RipgrepParser extends EventEmitter {
})
.filter(r => !!r);
return createTextSearchResult(uri, fullText, ranges, this.previewOptions);
return createTextSearchResult(uri, fullText, <Range[]>ranges, this.previewOptions);
}
private createTextSearchContext(data: IRgMatch, uri: URI): vscode.TextSearchContext[] {
......
......@@ -12,7 +12,7 @@ import * as vscode from 'vscode';
suite('TextSearchManager', () => {
test('fixes encoding', async () => {
let correctEncoding: boolean;
let correctEncoding = false;
const provider: vscode.TextSearchProvider = {
provideTextSearchResults(query: vscode.TextSearchQuery, options: vscode.TextSearchOptions, progress: vscode.Progress<vscode.TextSearchResult>, token: vscode.CancellationToken): vscode.ProviderResult<vscode.TextSearchComplete> {
correctEncoding = options.encoding === 'windows-1252';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册