fixed wrapped lines (#4526)

This commit is contained in:
Andrea Bogazzi 2017-12-02 21:18:41 +01:00 committed by GitHub
parent d276707e2d
commit 587d0657d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -647,13 +647,13 @@
if (lineStart !== lineEnd) {
// step1 remove the trailing of lineStart
if (this.styles[lineStart]) {
for (i = charStart; i < this._textLines[lineStart].length; i++) {
for (i = charStart; i < this._unwrappedTextLines[lineStart].length; i++) {
delete this.styles[lineStart][i];
}
}
// step2 move the trailing of lineEnd to lineStart if needed
if (this.styles[lineEnd]) {
for (i = charEnd; i < this._textLines[lineEnd].length; i++) {
for (i = charEnd; i < this._unwrappedTextLines[lineEnd].length; i++) {
styleObj = this.styles[lineEnd][i];
if (styleObj) {
this.styles[lineStart] || (this.styles[lineStart] = { });