Merge from vscode 011858832762aaff245b2336fb1c38166e7a10fb (#4663)

This commit is contained in:
Anthony Dresser
2019-03-22 13:07:54 -07:00
committed by GitHub
parent f5c9174c2f
commit 4a87a24235
296 changed files with 2531 additions and 2472 deletions

View File

@@ -74,8 +74,8 @@ export class GotoLineAction extends QuickOpenAction {
}
class GotoLineEntry extends EditorQuickOpenEntry {
private line: number;
private column: number;
private line!: number;
private column!: number;
private handler: GotoLineHandler;
constructor(line: string, editorService: IEditorService, handler: GotoLineHandler) {
@@ -140,7 +140,7 @@ class GotoLineEntry extends EditorQuickOpenEntry {
}
getInput(): IEditorInput | null {
return this.editorService.activeEditor || null;
return types.withUndefinedAsNull(this.editorService.activeEditor);
}
getOptions(pinned?: boolean): ITextEditorOptions {
@@ -218,8 +218,8 @@ export class GotoLineHandler extends QuickOpenHandler {
static readonly ID = 'workbench.picker.line';
private rangeHighlightDecorationId: IEditorLineDecoration | null;
private lastKnownEditorViewState: IEditorViewState | null;
private rangeHighlightDecorationId: IEditorLineDecoration | null = null;
private lastKnownEditorViewState: IEditorViewState | null = null;
constructor(@IEditorService private readonly editorService: IEditorService) {
super();

View File

@@ -289,7 +289,7 @@ class SymbolEntry extends EditorQuickOpenEntryGroup {
}
getInput(): IEditorInput | null {
return this.editorService.activeEditor || null;
return types.withUndefinedAsNull(this.editorService.activeEditor);
}
getOptions(pinned?: boolean): ITextEditorOptions {

View File

@@ -137,7 +137,7 @@ export class ViewPickerHandler extends QuickOpenHandler {
const result: ViewEntry[] = [];
if (views.length) {
for (const view of views) {
if (this.contextKeyService.contextMatchesRules(view.when || null)) {
if (this.contextKeyService.contextMatchesRules(view.when)) {
result.push(new ViewEntry(view.name, viewlet.name, () => this.viewsService.openView(view.id, true)));
}
}