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

Fix #61860 - one Match per FindMatch

上级 37fc885e
......@@ -244,14 +244,14 @@ export class FileMatch extends Disposable {
private updateMatches(matches: FindMatch[], modelChange: boolean) {
const textSearchResults = editorMatchesToTextSearchResults(matches, this._model, this._previewOptions);
textSearchResults.forEach(textSearchResult => {
const match = new Match(this, textSearchResult);
if (!this._removedMatches.has(match.id())) {
this.add(match);
if (this.isMatchSelected(match)) {
this._selectedMatch = match;
textSearchResultToMatches(textSearchResult, this).forEach(match => {
if (!this._removedMatches.has(match.id())) {
this.add(match);
if (this.isMatchSelected(match)) {
this._selectedMatch = match;
}
}
}
});
});
this._onChange.fire(modelChange);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册