LineWrapper.setMaxLength emits a change event for all screen lines.

This commit is contained in:
Nathan Sobo
2012-02-10 12:21:42 -07:00
parent b70acf2006
commit 479b64b654
2 changed files with 22 additions and 10 deletions

View File

@@ -11,7 +11,14 @@ class LineWrapper
@highlighter.on 'change', (e) => @handleChange(e)
setMaxLength: (@maxLength) ->
oldRange = new Range
oldRange.end.row = @screenLineCount() - 1
oldRange.end.column = _.last(_.last(@wrappedLines).screenLines).textLength
@buildWrappedLines()
newRange = new Range
newRange.end.row = @screenLineCount() - 1
newRange.end.column = _.last(_.last(@wrappedLines).screenLines).textLength
@trigger 'change', { oldRange, newRange }
buildWrappedLines: ->
@wrappedLines = @buildWrappedLinesForBufferRows(0, @buffer.lastRow())