🎨 Create block decorations in TextEditor

This is just an experiment, although I like that we can hide some information
(irrelevant to the user) behind a clean API.
This commit is contained in:
Antonio Scandurra
2015-11-26 15:40:07 +01:00
parent c8254566ef
commit 89d9a2ce83
2 changed files with 12 additions and 10 deletions

View File

@@ -1398,6 +1398,13 @@ class TextEditor extends Model
Section: Decorations
###
addBlockDecorationForScreenRow: (screenRow, element) ->
@decorateMarker(
@markScreenPosition([screenRow, 0], invalidate: "never"),
type: "block",
element: element
)
# Essential: Add a decoration that tracks a {TextEditorMarker}. When the
# marker moves, is invalidated, or is destroyed, the decoration will be
# updated to reflect the marker's state.