mirror of
https://github.com/atom/atom.git
synced 2026-02-16 09:35:54 -05:00
🎨 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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user