mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 12:04:04 +01:00
Remove model.getModeId()
This commit is contained in:
@@ -215,7 +215,7 @@ function getConfiguredLangId(modelService: IModelService, resource: uri): string
|
||||
if (resource) {
|
||||
const model = modelService.getModel(resource);
|
||||
if (model) {
|
||||
const modeId = model.getModeId();
|
||||
const modeId = model.getLanguageIdentifier().language;
|
||||
if (modeId && modeId !== PLAINTEXT_MODE_ID) {
|
||||
configuredLangId = modeId; // only take if the mode is specific (aka no just plain text)
|
||||
}
|
||||
|
||||
@@ -526,7 +526,7 @@ export class EditorStatus implements IStatusbarItem {
|
||||
const textModel = getTextModel(editorWidget);
|
||||
if (textModel) {
|
||||
// Compute mode
|
||||
const modeId = textModel.getModeId();
|
||||
const modeId = textModel.getLanguageIdentifier().language;
|
||||
info = { mode: this.modeService.getLanguageName(modeId) };
|
||||
}
|
||||
}
|
||||
@@ -736,7 +736,7 @@ export class ChangeModeAction extends Action {
|
||||
// Compute mode
|
||||
let currentModeId: string;
|
||||
if (textModel) {
|
||||
const modeId = textModel.getModeId();
|
||||
const modeId = textModel.getLanguageIdentifier().language;
|
||||
currentModeId = this.modeService.getLanguageName(modeId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user