* Reset horscroll class when new session loads

This commit is contained in:
Ruben Daniels 2012-04-22 16:16:16 -07:00
commit b448a1ca9c

View file

@ -119,12 +119,9 @@ var VirtualRenderer = function(container, theme) {
_self.scrollLeft = scrollLeft;
_self.session.setScrollLeft(scrollLeft);
if (scrollLeft == 0) {
_self.scroller.className = "ace_scroller";
}
else {
_self.scroller.className = "ace_scroller horscroll";
}
_self.scroller.className = scrollLeft == 0
? "ace_scroller"
: "ace_scroller horscroll";
});
this.cursorPos = {
@ -191,12 +188,16 @@ var VirtualRenderer = function(container, theme) {
this.setSession = function(session) {
this.session = session;
this.scroller.className = "ace_scroller";
this.$cursorLayer.setSession(session);
this.$markerBack.setSession(session);
this.$markerFront.setSession(session);
this.$gutterLayer.setSession(session);
this.$textLayer.setSession(session);
this.$loop.schedule(this.CHANGE_FULL);
};
/**