mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
fix issue #2295
component: TypeScriptWorker (tsWorker.ts) - Enable 'skipEncoding' flag on Uri.toString invokation on getScriptFileNames() method - Compare 'fileName' argument provided to _getModel() method both with Uri encoded and not
This commit is contained in:
parent
55edb3fc58
commit
675844ac7e
1 changed files with 3 additions and 2 deletions
|
|
@ -63,14 +63,15 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
|
|||
|
||||
getScriptFileNames(): string[] {
|
||||
const allModels = this._ctx.getMirrorModels().map((model) => model.uri);
|
||||
const models = allModels.filter((uri) => !fileNameIsLib(uri)).map((uri) => uri.toString());
|
||||
const models = allModels.filter((uri) => !fileNameIsLib(uri)).map((uri) => uri.toString(true));
|
||||
return models.concat(Object.keys(this._extraLibs));
|
||||
}
|
||||
|
||||
private _getModel(fileName: string): worker.IMirrorModel | null {
|
||||
let models = this._ctx.getMirrorModels();
|
||||
for (let i = 0; i < models.length; i++) {
|
||||
if (models[i].uri.toString() === fileName) {
|
||||
const uri = models[i].uri;
|
||||
if (uri.toString() === fileName || uri.toString(true) === fileName) {
|
||||
return models[i];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue