mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Rename ‘blinkCursorsOff’ to ‘cursorsVisible’ in presenter state
This commit is contained in:
@@ -13,12 +13,12 @@ class CursorsComponent
|
||||
@oldState ?= {cursors: {}}
|
||||
|
||||
# update blink class
|
||||
if newState.blinkCursorsOff isnt @oldState.blinkCursorsOff
|
||||
if newState.blinkCursorsOff
|
||||
@domNode.classList.add 'blink-off'
|
||||
else
|
||||
if newState.cursorsVisible isnt @oldState.cursorsVisible
|
||||
if newState.cursorsVisible
|
||||
@domNode.classList.remove 'blink-off'
|
||||
@oldState.blinkCursorsOff = newState.blinkCursorsOff
|
||||
else
|
||||
@domNode.classList.add 'blink-off'
|
||||
@oldState.cursorsVisible = newState.cursorsVisible
|
||||
|
||||
# remove cursors
|
||||
for id of @oldState.cursors
|
||||
|
||||
@@ -113,7 +113,7 @@ class TextEditorPresenter
|
||||
hiddenInput: {}
|
||||
content:
|
||||
scrollingVertically: false
|
||||
blinkCursorsOff: false
|
||||
cursorsVisible: true
|
||||
lines: {}
|
||||
highlights: {}
|
||||
overlays: {}
|
||||
@@ -983,11 +983,11 @@ class TextEditorPresenter
|
||||
clearInterval(@toggleCursorBlinkHandle)
|
||||
|
||||
toggleCursorBlink: ->
|
||||
@state.content.blinkCursorsOff = not @state.content.blinkCursorsOff
|
||||
@state.content.cursorsVisible = not @state.content.cursorsVisible
|
||||
@emitter.emit 'did-update-state'
|
||||
|
||||
pauseCursorBlinking: ->
|
||||
@state.content.blinkCursorsOff = false
|
||||
@state.content.cursorsVisible = true
|
||||
@stopBlinkingCursors()
|
||||
@startBlinkingCursorsAfterDelay ?= _.debounce(@startBlinkingCursors, @getCursorBlinkResumeDelay())
|
||||
@startBlinkingCursorsAfterDelay()
|
||||
|
||||
Reference in New Issue
Block a user