From 85885ca9007a5d5c8e4db65940d78fda90c6b456 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Tue, 7 Jun 2016 15:21:20 +0200 Subject: [PATCH] bring back n of m label --- src/vs/editor/contrib/gotoError/browser/gotoError.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/vs/editor/contrib/gotoError/browser/gotoError.ts b/src/vs/editor/contrib/gotoError/browser/gotoError.ts index d3ba508d650..9ff59ce8074 100644 --- a/src/vs/editor/contrib/gotoError/browser/gotoError.ts +++ b/src/vs/editor/contrib/gotoError/browser/gotoError.ts @@ -169,6 +169,14 @@ class MarkerModel { return { errors, others }; } + public get total() { + return this._markers.length; + } + + public indexOf(marker: IMarker): number { + return 1 + this._markers.indexOf(marker); + } + public reveal(): void { if (this._nextIdx === -1) { @@ -381,6 +389,9 @@ class MarkerNavigationWidget extends PeekViewWidget { break; } + // update meta title + this.setMetaTitle(nls.localize('', " – {0}/{1}", this._model.indexOf(marker), this._model.total)); + // update label and show dom.clearNode(this._element); this._element.appendChild(renderHtml(marker.message)); -- GitLab