From 4e1722522ded4c18d9f4c665231db57c2f61ddc3 Mon Sep 17 00:00:00 2001 From: Sandeep Somavarapu Date: Tue, 20 Sep 2016 19:52:59 +0200 Subject: [PATCH] markersModel: use hasFilters to check for filter --- src/vs/workbench/parts/markers/common/markersModel.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/parts/markers/common/markersModel.ts b/src/vs/workbench/parts/markers/common/markersModel.ts index 780b4799fd4..8d442fd468d 100644 --- a/src/vs/workbench/parts/markers/common/markersModel.ts +++ b/src/vs/workbench/parts/markers/common/markersModel.ts @@ -220,17 +220,17 @@ export class MarkersModel { for (let i = 0; i < entry.value.length; i++) { const m = entry.value[i]; const uri = entry.key.toString(); - if (!this._filterOptions.filter || this.filterMarker(m)) { + if (!this._filterOptions.hasFilters() || this.filterMarker(m)) { markers.push(this.toMarker(m, i, uri)); } } - const matches = this._filterOptions.filter ? FilterOptions._filter(this._filterOptions.filter, paths.basename(entry.key.fsPath)) : []; + const matches = this._filterOptions.hasFilters() ? FilterOptions._filter(this._filterOptions.filter, paths.basename(entry.key.fsPath)) : []; return new Resource(entry.key, markers, this.getStatistics(entry.value), matches || []); } private toMarker(marker: IMarker, index: number, uri: string): Marker { - const labelMatches = this._filterOptions.filter ? FilterOptions._fuzzyFilter(this._filterOptions.filter, marker.message) : []; - const sourceMatches = marker.source && this._filterOptions.filter ? FilterOptions._filter(this._filterOptions.filter, marker.source) : []; + const labelMatches = this._filterOptions.hasFilters() ? FilterOptions._fuzzyFilter(this._filterOptions.filter, marker.message) : []; + const sourceMatches = marker.source && this._filterOptions.hasFilters() ? FilterOptions._filter(this._filterOptions.filter, marker.source) : []; return new Marker(uri + index, marker, labelMatches || [], sourceMatches || []); } -- GitLab