Update renderer if wrapMode changes
This commit is contained in:
parent
28ea247f17
commit
e01c59a8db
2 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -351,6 +351,7 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.$markerLayer.update(this.layerConfig);
|
||||
this.$cursorLayer.update(this.layerConfig);
|
||||
this.$updateScrollBar();
|
||||
this.scrollCursorIntoView();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue