update syntax of existing tabs when new syntax is defined

pull/85/head
nightwing 2015-04-17 02:30:11 +04:00
rodzic b1535ae53c
commit c6e27314e9
1 zmienionych plików z 11 dodań i 1 usunięć

Wyświetl plik

@ -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();
}