Fix bug in LineMap.spliceByDelta with multi-fragment screen lines

If the row following a row being replaced had multiple fragments, some
of these fragments would be accidentally deleted.
This commit is contained in:
Nathan Sobo
2012-03-01 11:52:27 -07:00
parent 32a6a2cd7f
commit eb0df2f21d
2 changed files with 17 additions and 2 deletions

View File

@@ -76,9 +76,8 @@ class LineMap
delta = new Point
for lineFragment, i in @lineFragments
startIndex ?= i if delta.row == startRow
break if rowCount == 0 and delta.row == stopRow
break if delta.row == stopRow
delta = delta.add(lineFragment[deltaType])
break if delta.row > stopRow
stopIndex++
startIndex ?= i