mirror of
https://github.com/atom/atom.git
synced 2026-01-25 06:48:28 -05:00
Avoid named parameter to save an allocation
This commit is contained in:
@@ -1164,7 +1164,7 @@ class DisplayBuffer extends Model
|
||||
while wrapScreenColumn = tokenizedLine.findWrapColumn(@getSoftWrapColumn())
|
||||
[wrappedLine, tokenizedLine] = tokenizedLine.softWrapAt(
|
||||
wrapScreenColumn,
|
||||
hangingIndent: @configSettings.softWrapHangingIndent
|
||||
@configSettings.softWrapHangingIndent
|
||||
)
|
||||
break if wrappedLine.hasOnlySoftWrapIndentation()
|
||||
screenLines.push(wrappedLine)
|
||||
|
||||
@@ -132,11 +132,9 @@ class TokenizedLine
|
||||
else
|
||||
indentTokens
|
||||
|
||||
softWrapAt: (column, options = {}) ->
|
||||
softWrapAt: (column, hangingIndent) ->
|
||||
return [new TokenizedLine([], '', [0, 0], [0, 0]), this] if column == 0
|
||||
|
||||
{hangingIndent} = options
|
||||
|
||||
rightTokens = new Array(@tokens...)
|
||||
leftTokens = []
|
||||
leftTextLength = 0
|
||||
|
||||
Reference in New Issue
Block a user