mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
No more typeless decorations
Now you can specify a list of types with your decoration.
This commit is contained in:
@@ -12,5 +12,7 @@ class Decoration
|
||||
@marker?.isValid()
|
||||
|
||||
isType: (decorationType) ->
|
||||
return true unless @type
|
||||
decorationType is @type
|
||||
if _.isArray(@type)
|
||||
decorationType in @type
|
||||
else
|
||||
decorationType is @type
|
||||
|
||||
@@ -1233,7 +1233,7 @@ class Editor extends Model
|
||||
addCursor: (marker) ->
|
||||
cursor = new Cursor(editor: this, marker: marker)
|
||||
@cursors.push(cursor)
|
||||
@addDecorationForMarker(marker, {class: 'cursor-line'})
|
||||
@addDecorationForMarker(marker, type: ['gutter', 'line'], class: 'cursor-line')
|
||||
@emit 'cursor-added', cursor
|
||||
cursor
|
||||
|
||||
|
||||
Reference in New Issue
Block a user