diff --git a/lib/mixins/canvas-drawer.coffee b/lib/mixins/canvas-drawer.coffee index a3a0410a..126fbe79 100644 --- a/lib/mixins/canvas-drawer.coffee +++ b/lib/mixins/canvas-drawer.coffee @@ -444,11 +444,14 @@ class CanvasDrawer extends Mixin end: change.start - 1 domStart: range.domStart) if change.end < range.end - newIntactRanges.push( - start: change.end + change.screenDelta + 1 - end: range.end + change.screenDelta - domStart: range.domStart + change.end + 1 - range.start - ) + # If the bufferDelta is 0 then it's a change in the screen lines + # due to soft wrapping, we don't need to touch to the intact ranges + unless change.bufferDelta is 0 + newIntactRanges.push( + start: change.end + change.screenDelta + 1 + end: range.end + change.screenDelta + domStart: range.domStart + change.end + 1 - range.start + ) intactRange = newIntactRanges[newIntactRanges.length - 1]