Take padding into account when determining wrap limit

This commit is contained in:
Fabian Jakobs 2011-02-12 11:43:17 +01:00
commit e3866dbcb7

View file

@ -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;
}