Don't cache entire line length on lines > 160 chars

This commit is contained in:
probablycorey
2013-10-18 11:58:36 -07:00
parent fd062a7c4f
commit eced0a3208

View File

@@ -1591,7 +1591,11 @@ class Editor extends View
for char, i in content
# Dont return right away, finish caching the whole line
returnLeft = left if index == column
if index == column
returnLeft = left
# Don't cache lines longer than 100 chars
return returnLeft if lineElement.innerText.length > 160
oldLeft = left
scopes = @scopesForColumn(tokenizedLine, index)