mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Simplify on-demand placeholder line creation and add test coverage
This commit is contained in:
@@ -269,14 +269,8 @@ class TokenizedBuffer extends Model
|
||||
else
|
||||
text = @buffer.lineForRow(bufferRow)
|
||||
lineEnding = @buffer.lineEndingForRow(bufferRow)
|
||||
tags = [
|
||||
@grammar.startIdForScope(@grammar.scopeName),
|
||||
text.length,
|
||||
@grammar.endIdForScope(@grammar.scopeName)
|
||||
]
|
||||
tags = [@grammar.startIdForScope(@grammar.scopeName), text.length, @grammar.endIdForScope(@grammar.scopeName)]
|
||||
@tokenizedLines[bufferRow] = new TokenizedLine({openScopes: [], text, tags, lineEnding, @tokenIterator})
|
||||
else
|
||||
null
|
||||
|
||||
tokenizedLinesForRows: (startRow, endRow) ->
|
||||
for row in [startRow..endRow] by 1
|
||||
|
||||
Reference in New Issue
Block a user