add changes from newclient

This commit is contained in:
Harutyun Amirjanyan 2013-05-27 12:27:06 -04:00
commit d40a9a228f
4 changed files with 18 additions and 87 deletions

View file

@ -349,6 +349,8 @@ var VirtualRenderer = function(container, theme) {
if (this.session.getUseWrapMode() && this.adjustWrapLimit())
this.$loop.schedule(this.CHANGE_FULL);
else
this.$loop.schedule(this.CHANGE_MARKER);
};
/**
@ -1270,12 +1272,14 @@ var VirtualRenderer = function(container, theme) {
afterLoad(theme);
}
function afterLoad(theme) {
if (!theme.cssClass)
function afterLoad(module) {
if (_self.$themeValue != theme)
return;
if (!module.cssClass)
return;
dom.importCssString(
theme.cssText,
theme.cssClass,
module.cssText,
module.cssClass,
_self.container.ownerDocument
);
@ -1283,13 +1287,13 @@ var VirtualRenderer = function(container, theme) {
dom.removeCssClass(_self.container, _self.theme.cssClass);
// this is kept only for backwards compatibility
_self.$theme = theme.cssClass;
_self.$theme = module.cssClass;
_self.theme = theme;
dom.addCssClass(_self.container, theme.cssClass);
dom.setCssClass(_self.container, "ace_dark", theme.isDark);
_self.theme = module;
dom.addCssClass(_self.container, module.cssClass);
dom.setCssClass(_self.container, "ace_dark", module.isDark);
var padding = theme.padding || 4;
var padding = module.padding || 4;
if (_self.$padding && padding != _self.$padding)
_self.setPadding(padding);
@ -1299,7 +1303,7 @@ var VirtualRenderer = function(container, theme) {
_self.onResize();
}
_self._dispatchEvent('themeLoaded',{theme:theme});
_self._dispatchEvent('themeLoaded',{theme:module});
}
};