Comparar commits

...

1 Commits

Autor SHA1 Mensagem Data
Nathan Sobo 60375007e7 Run special assertion if editor.debugFindMaxLineLength is true 2014-07-03 14:20:45 -06:00
+14
Ver Arquivo
@@ -1075,8 +1075,22 @@ class DisplayBuffer extends Model
@longestScreenRow = maxLengthCandidatesStartRow + screenRow
@maxLineLength = length
if atom.config.get('editor.debugFindMaxLineLength')
unless @maxLineLength is @findReferenceMaxLineLength()
debugger
throw new Error("Found wrong max line length")
@computeScrollWidth() if oldMaxLineLength isnt @maxLineLength
findReferenceMaxLineLength: ->
maxLineLength = 0
for line in @screenLines
length = line.text.length
maxLineLength = length if length > maxLineLength
maxLineLength
computeScrollWidth: ->
@scrollWidth = @pixelPositionForScreenPosition([@longestScreenRow, @maxLineLength]).left + 1