mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 20:26:08 +00:00
simplify
This commit is contained in:
@@ -360,20 +360,7 @@ export class WindowTitle extends Disposable {
|
|||||||
const profileName = this.userDataProfileService.currentProfile.isDefault ? '' : this.userDataProfileService.currentProfile.name;
|
const profileName = this.userDataProfileService.currentProfile.isDefault ? '' : this.userDataProfileService.currentProfile.name;
|
||||||
const focusedView: string = this.viewsService.getFocusedViewName();
|
const focusedView: string = this.viewsService.getFocusedViewName();
|
||||||
const activeEditorState = editorResource ? this.decorationsService.getDecoration(editorResource, false)?.tooltip : undefined;
|
const activeEditorState = editorResource ? this.decorationsService.getDecoration(editorResource, false)?.tooltip : undefined;
|
||||||
|
const activeEditorLanguageId = this.editorService.activeTextEditorLanguageId;
|
||||||
// Compute active editor language ID
|
|
||||||
let activeEditorLanguageId = '';
|
|
||||||
const activeTextEditorControl = this.editorService.activeTextEditorControl;
|
|
||||||
if (activeTextEditorControl) {
|
|
||||||
const model = isCodeEditor(activeTextEditorControl)
|
|
||||||
? activeTextEditorControl.getModel()
|
|
||||||
: isDiffEditor(activeTextEditorControl)
|
|
||||||
? activeTextEditorControl.getModifiedEditor().getModel()
|
|
||||||
: null;
|
|
||||||
if (model) {
|
|
||||||
activeEditorLanguageId = model.getLanguageId();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const variables: Record<string, string> = {};
|
const variables: Record<string, string> = {};
|
||||||
for (const [contextKey, name] of this.variables) {
|
for (const [contextKey, name] of this.variables) {
|
||||||
|
|||||||
Reference in New Issue
Block a user