提交 523abdc0 编写于 作者: S Sandeep Somavarapu

Fix #47748

上级 6705b91f
......@@ -11,6 +11,7 @@ import { ITextResourceConfigurationService } from 'vs/editor/common/services/res
import { IPosition, Position } from 'vs/editor/common/core/position';
import { IModeService } from 'vs/editor/common/services/modeService';
import { IModelService } from 'vs/editor/common/services/modelService';
import { basename } from 'vs/base/common/paths';
export class TextResourceConfigurationService extends Disposable implements ITextResourceConfigurationService {
......@@ -42,6 +43,6 @@ export class TextResourceConfigurationService extends Disposable implements ITex
if (model) {
return position ? this.modeService.getLanguageIdentifier(model.getLanguageIdAtPosition(position.lineNumber, position.column)).language : model.getLanguageIdentifier().language;
}
return this.modeService.getModeIdByFilenameOrFirstLine(resource.fsPath);
return this.modeService.getModeIdByFilenameOrFirstLine(basename(resource.path));
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册