fix multi line selection regression introduced with #2996

This commit is contained in:
Andrea Bogazzi 2016-05-21 16:07:00 +02:00
parent dfb5e4e903
commit dd0b9f63d3

View file

@ -515,7 +515,7 @@
end = this.get2DCursorLocation(this.selectionEnd),
startLine = start.lineIndex,
endLine = end.lineIndex;
ctx.clearRect(-this.width / 2, -this.height / 2, this.width, this.height);
for (var i = startLine; i <= endLine; i++) {
var lineOffset = this._getLineLeftOffset(this._getLineWidth(ctx, i)) || 0,
lineHeight = this._getHeightOfLine(this.ctx, i),
@ -539,7 +539,6 @@
boxWidth += this._getWidthOfChar(ctx, line[j2], i, j2);
}
}
ctx.clearRect(-this.width / 2, -this.height / 2, this.width, this.height);
ctx.fillRect(
boundaries.left + lineOffset,
boundaries.top + boundaries.topOffset,