honor that the internal search model is 0-offset based, #45000

This commit is contained in:
Johannes Rieken
2018-03-20 12:48:56 +01:00
parent 73e3488685
commit 8d8c233261

View File

@@ -154,7 +154,7 @@ export class ExtHostFileSystem implements ExtHostFileSystemShape {
const progress = {
report: (data: vscode.TextSearchResult) => {
this._proxy.$handleFindMatch(handle, session, [data.uri, {
lineNumber: 1 + data.range.start.line,
lineNumber: data.range.start.line,
preview: data.preview.leading + data.preview.matching + data.preview.trailing,
offsetAndLengths: [[data.preview.leading.length, data.preview.matching.length]]
}]);