mirror of
https://github.com/atom/atom.git
synced 2026-02-02 02:35:00 -05:00
Avoid creating line nodes twice in lines-yardstick-spec.coffee
This commit is contained in:
@@ -42,11 +42,12 @@ describe "LinesYardstick", ->
|
||||
lineNode
|
||||
|
||||
mockLineNodesProvider =
|
||||
lineNodesById: {}
|
||||
lineIdForScreenRow: (screenRow) ->
|
||||
editor.screenLineForScreenRow(screenRow).id
|
||||
|
||||
lineNodeForScreenRow: (screenRow) ->
|
||||
buildLineNode(screenRow)
|
||||
@lineNodesById[@lineIdForScreenRow(screenRow)] ?= buildLineNode(screenRow)
|
||||
|
||||
textNodesForScreenRow: (screenRow) ->
|
||||
lineNode = @lineNodeForScreenRow(screenRow)
|
||||
|
||||
Reference in New Issue
Block a user