kopia lustrzana https://github.com/c9/core
update syntax of existing tabs when new syntax is defined
rodzic
b1535ae53c
commit
c6e27314e9
|
@ -1218,7 +1218,16 @@ define(function(require, exports, module) {
|
|||
}
|
||||
}
|
||||
|
||||
var updateSyntaxMenu = lang.delayedCall(rebuildSyntaxMenu, 50);
|
||||
var updateSyntaxMenu = lang.delayedCall(function() {
|
||||
rebuildSyntaxMenu();
|
||||
tabs.getTabs().forEach(function(tab) {
|
||||
if (tab.editorType == "ace") {
|
||||
var c9Session = tab.document.getSession();
|
||||
if (c9Session.session)
|
||||
detectSyntax(c9Session, tab.path);
|
||||
}
|
||||
});
|
||||
}, 50);
|
||||
|
||||
/***** Syntax *****/
|
||||
|
||||
|
@ -1237,6 +1246,7 @@ define(function(require, exports, module) {
|
|||
modes.extensions[ext] = name;
|
||||
});
|
||||
|
||||
|
||||
updateSyntaxMenu.schedule();
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue