Take padding into account when determining wrap limit
This commit is contained in:
parent
ce36cf2922
commit
e3866dbcb7
1 changed files with 2 additions and 1 deletions
|
|
@ -212,7 +212,8 @@ var VirtualRenderer = function(container, theme) {
|
|||
this.scroller.style.width = Math.max(0, width - gutterWidth - this.scrollBar.getWidth()) + "px";
|
||||
|
||||
if (this.session.getUseWrapMode()) {
|
||||
var limit = Math.floor(this.scroller.clientWidth / this.characterWidth);
|
||||
var availableWidth = this.scroller.clientWidth - this.$padding * 2;
|
||||
var limit = Math.floor(availableWidth / this.characterWidth) - 1;
|
||||
if (this.session.adjustWrapLimit(limit) || force) {
|
||||
changes = changes | this.CHANGE_FULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue