mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Only return decorations for markers intersecting the screen row range
This relies on a fix to the interval-skip-list provided with the upgrade to text-buffer@2.4.0.
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
"serializable": "^1",
|
||||
"space-pen": "3.2.0",
|
||||
"temp": "0.7.0",
|
||||
"text-buffer": "^2.3.0",
|
||||
"text-buffer": "^2.4.0",
|
||||
"theorist": "^1",
|
||||
"underscore-plus": "^1.4.1",
|
||||
"vm-compatibility-layer": "0.1.0"
|
||||
|
||||
@@ -722,7 +722,7 @@ class DisplayBuffer extends Model
|
||||
decorationsForScreenRowRange: (startScreenRow, endScreenRow) ->
|
||||
decorationsByMarkerId = {}
|
||||
|
||||
for marker in @findMarkers()
|
||||
for marker in @findMarkers(intersectsScreenRowRange: [startScreenRow, endScreenRow])
|
||||
if decorations = @decorationsByMarkerId[marker.id]
|
||||
decorationsByMarkerId[marker.id] = decorations
|
||||
decorationsByMarkerId
|
||||
|
||||
Reference in New Issue
Block a user