mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Make foldable decorations work again
This commit is contained in:
@@ -18,8 +18,10 @@ class Decorations
|
||||
filteredDecorations[screenRow] ?= []
|
||||
filteredDecorations[screenRow].push decoration
|
||||
|
||||
# if @editor.isFoldableAtScreenRow(screenRow)
|
||||
# filteredDecorations[screenRow].push new Decoration(null, {class: 'foldable'})
|
||||
for screenRow in [@startScreenRow...@endScreenRow]
|
||||
if @editor.isFoldableAtScreenRow(screenRow)
|
||||
filteredDecorations[screenRow] ?= []
|
||||
filteredDecorations[screenRow].push new Decoration(null, {class: 'foldable'})
|
||||
|
||||
@decorationsCache[decorationType] = filteredDecorations
|
||||
@decorationsCache[decorationType]
|
||||
|
||||
@@ -844,6 +844,10 @@ class Editor extends Model
|
||||
isFoldableAtBufferRow: (bufferRow) ->
|
||||
@languageMode.isFoldableAtBufferRow(bufferRow)
|
||||
|
||||
isFoldableAtScreenRow: (screenRow) ->
|
||||
bufferRow = @displayBuffer.bufferRowForScreenRow(screenRow)
|
||||
@isFoldableAtBufferRow(bufferRow)
|
||||
|
||||
# TODO: Rename to foldRowRange?
|
||||
createFold: (startRow, endRow) ->
|
||||
@displayBuffer.createFold(startRow, endRow)
|
||||
|
||||
Reference in New Issue
Block a user