Merge VS Code 1.31.1 (#4283)

This commit is contained in:
Matt Irvine
2019-03-15 13:09:45 -07:00
committed by GitHub
parent 7d31575149
commit 86bac90001
1716 changed files with 53308 additions and 48375 deletions

View File

@@ -3,7 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { IDisposable } from 'vs/base/common/lifecycle';
import * as dom from 'vs/base/browser/dom';
import * as objects from 'vs/base/common/objects';
import { renderOcticons } from 'vs/base/browser/ui/octiconLabel/octiconLabel';
@@ -14,7 +13,7 @@ export interface IHighlight {
end: number;
}
export class HighlightedLabel implements IDisposable {
export class HighlightedLabel {
private domNode: HTMLElement;
private text: string;
@@ -33,7 +32,7 @@ export class HighlightedLabel implements IDisposable {
return this.domNode;
}
set(text: string, highlights: IHighlight[] = [], title: string = '', escapeNewLines?: boolean) {
set(text: string | undefined, highlights: IHighlight[] = [], title: string = '', escapeNewLines?: boolean) {
if (!text) {
text = '';
}
@@ -58,12 +57,10 @@ export class HighlightedLabel implements IDisposable {
private render() {
dom.clearNode(this.domNode);
let htmlContent: string[] = [],
highlight: IHighlight,
pos = 0;
let htmlContent: string[] = [];
let pos = 0;
for (let i = 0; i < this.highlights.length; i++) {
highlight = this.highlights[i];
for (const highlight of this.highlights) {
if (highlight.end === highlight.start) {
continue;
}
@@ -93,11 +90,6 @@ export class HighlightedLabel implements IDisposable {
this.didEverRender = true;
}
dispose() {
this.text = null!; // StrictNullOverride: nulling out ok in dispose
this.highlights = null!; // StrictNullOverride: nulling out ok in dispose
}
static escapeNewLines(text: string, highlights: IHighlight[]): string {
let total = 0;