disable updateNameFromFirstLine from untitledTextEditorModel (#9064)

* disable updateNameFromFirstLine

* change to either

* WIP commit

* final fix

* formatting

* fix for tab space

* replace tab with space

* Fix formatting

Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
Alex Ma
2020-02-06 14:09:45 -08:00
committed by GitHub
parent 5ef69f5133
commit 6da98ed439
3 changed files with 14 additions and 14 deletions

View File

@@ -510,15 +510,15 @@ class ResourceLabelWidget extends IconLabel {
}
let label = this.label.name || '';
if (resource?.scheme === Schemas.untitled) {
// Untitled labels are very dynamic because they may change
// whenever the content changes. As such we always ask the
// text file service for the name of the untitled editor
const untitledName = this.textFileService.untitled.get(resource)?.getName();
if (untitledName) {
label = untitledName;
}
}
// if (resource?.scheme === Schemas.untitled) { // {{SQL CARBON EDIT}} - For Query Editor, untitled editor query must use same label.
// // Untitled labels are very dynamic because they may change
// // whenever the content changes. As such we always ask the
// // text file service for the name of the untitled editor
// const untitledName = this.textFileService.untitled.get(resource)?.getName();
// if (untitledName) {
// label = untitledName;
// }
// }
this.setLabel(label, this.label.description, iconLabelOptions);