From 32ea281e110a60f345ab82fa146f0369a6c0d7d4 Mon Sep 17 00:00:00 2001 From: Anthony Dresser Date: Wed, 11 Mar 2020 14:48:26 -0700 Subject: [PATCH] Fix text content in title (#9534) (#9552) * fix text content in title * revert changes and change default setting instead --- src/sql/workbench/common/editor/query/queryEditorInput.ts | 4 ++-- src/vs/workbench/browser/workbench.contribution.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sql/workbench/common/editor/query/queryEditorInput.ts b/src/sql/workbench/common/editor/query/queryEditorInput.ts index 2b87c51625..6cf20da345 100644 --- a/src/sql/workbench/common/editor/query/queryEditorInput.ts +++ b/src/sql/workbench/common/editor/query/queryEditorInput.ts @@ -209,9 +209,9 @@ export abstract class QueryEditorInput extends EditorInput implements IConnectab } else { title += localize('disconnected', "disconnected"); } - return this._text.getName() + (longForm ? (' - ' + title) : ` - ${trimTitle(title)}`); + return this.text.getName() + (longForm ? (' - ' + title) : ` - ${trimTitle(title)}`); } else { - return this._text.getName(); + return this.text.getName(); } } diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts index 351f862d99..2380b35282 100644 --- a/src/vs/workbench/browser/workbench.contribution.ts +++ b/src/vs/workbench/browser/workbench.contribution.ts @@ -49,7 +49,7 @@ import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuratio nls.localize('workbench.editor.untitled.labelFormat.content', "The name of the untitled file is derived from the contents of its first line unless it has an associated file path. It will fallback to the name in case the line is empty or contains no word characters."), nls.localize('workbench.editor.untitled.labelFormat.name', "The name of the untitled file is not derived from the contents of the file."), ], - 'default': 'content', + 'default': 'name', // {{SQL CARBON EDIT}} change default from content to name 'description': nls.localize({ comment: ['This is the description for a setting. Values surrounded by parenthesis are not to be translated.'], key: 'untitledLabelFormat'