Don't tokenize files that have more than 10000 lines

This commit is contained in:
Corey Johnson & Nathan Sobo 2013-04-23 12:00:57 -07:00
parent 840efa3d82
commit 987d1da233

View File

@ -62,8 +62,11 @@ class TokenizedBuffer
@invalidateRow(0)
@trigger "changed", { start: 0, end: lastRow, delta: 0 }
tooBigToTokenize: ->
@screenLines.length > 10000
tokenizeInBackground: ->
return if not @visible or @pendingChunk
return if not @visible or @pendingChunk or @tooBigToTokenize()
@pendingChunk = true
_.defer =>
@pendingChunk = false