mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
LineWrapper.setMaxLength emits a change event for all screen lines.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user