mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Assign a key to cursor and selection components
This commit is contained in:
@@ -14,11 +14,12 @@ CursorsComponent = React.createClass
|
||||
|
||||
render: ->
|
||||
{editor} = @props
|
||||
{blinkCursorsOff} = @state
|
||||
blinkOff = @state.blinkCursorsOff
|
||||
|
||||
div className: 'cursors',
|
||||
for selection in editor.getSelections() when editor.selectionIntersectsVisibleRowRange(selection)
|
||||
CursorComponent(cursor: selection.cursor, blinkOff: blinkCursorsOff)
|
||||
{cursor} = selection
|
||||
CursorComponent({key: cursor.id, cursor, blinkOff})
|
||||
|
||||
getInitialState: ->
|
||||
blinkCursorsOff: false
|
||||
|
||||
@@ -11,4 +11,4 @@ SelectionsComponent = React.createClass
|
||||
|
||||
div className: 'selections',
|
||||
for selection in editor.getSelections() when editor.selectionIntersectsVisibleRowRange(selection)
|
||||
SelectionComponent({selection})
|
||||
SelectionComponent({key: selection.id, selection})
|
||||
|
||||
Reference in New Issue
Block a user