Update renderer if wrapMode changes

This commit is contained in:
Julian Viereck 2011-01-13 14:00:07 +01:00
commit e01c59a8db
2 changed files with 5 additions and 0 deletions

View file

@ -118,6 +118,7 @@ var Editor =function(renderer, doc) {
this.doc.removeEventListener("change", this.$onDocumentChange);
this.doc.removeEventListener("changeMode", this.$onDocumentModeChange);
this.doc.removeEventListener("changeTabSize", this.$onDocumentChangeTabSize);
this.doc.removeEventListener("changeWrapMode", this.$onDocumentChangeWrapMode);
this.doc.removeEventListener("changeBreakpoint", this.$onDocumentChangeBreakpoint);
var selection = this.doc.getSelection();
@ -139,6 +140,9 @@ var Editor =function(renderer, doc) {
this.$onDocumentChangeTabSize = this.renderer.updateText.bind(this.renderer);
doc.addEventListener("changeTabSize", this.$onDocumentChangeTabSize);
this.$onDocumentChangeWrapMode = this.renderer.updateFull.bind(this.renderer);
doc.addEventListener("changeWrapMode", this.$onDocumentChangeWrapMode);
this.$onDocumentChangeBreakpoint = this.onDocumentChangeBreakpoint.bind(this);
this.doc.addEventListener("changeBreakpoint", this.$onDocumentChangeBreakpoint);

View file

@ -351,6 +351,7 @@ var VirtualRenderer = function(container, theme) {
this.$markerLayer.update(this.layerConfig);
this.$cursorLayer.update(this.layerConfig);
this.$updateScrollBar();
this.scrollCursorIntoView();
return;
}