mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2024-12-05 01:31:32 +00:00
Run IDE language detection only when selected file is changed
This commit is contained in:
parent
ff3886ad64
commit
f8e9586be3
@ -31,6 +31,7 @@ export class IdeComponent implements OnInit {
|
||||
|
||||
files: string[];
|
||||
filename = '';
|
||||
lastFilename = '';
|
||||
code = 'Loading your file...';
|
||||
|
||||
codeState = CodeState.SAVED;
|
||||
@ -94,8 +95,11 @@ export class IdeComponent implements OnInit {
|
||||
}
|
||||
this.code = (message.content != null) ? message.content : this.code;
|
||||
this.files = message.files;
|
||||
if (this.lastFilename !== this.filename) {
|
||||
this.autoDetectEditorLanguage(this.filename);
|
||||
}
|
||||
this.lastFilename = this.filename;
|
||||
}
|
||||
}
|
||||
|
||||
writeHandler(message: IDEMessage) {
|
||||
|
Loading…
Reference in New Issue
Block a user