mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Revert "Move setImmediate into requestUpdate; Batch updates"
This reverts commit ad522e6ab1.
This commit is contained in:
@@ -177,9 +177,7 @@ EditorComponent = React.createClass
|
||||
if @batchingUpdates
|
||||
@updateRequested = true
|
||||
else
|
||||
@willUpdate ?= setImmediate =>
|
||||
@forceUpdate()
|
||||
@willUpdate = null
|
||||
@forceUpdate()
|
||||
|
||||
getRenderedRowRange: ->
|
||||
{editor, lineOverdrawMargin} = @props
|
||||
@@ -528,7 +526,10 @@ EditorComponent = React.createClass
|
||||
@cursorsMoved = true
|
||||
|
||||
onDecorationChanged: ->
|
||||
@requestUpdate()
|
||||
return if @decorationChangedImmediate?
|
||||
@decorationChangedImmediate = setImmediate =>
|
||||
@requestUpdate()
|
||||
@decorationChangedImmediate = null
|
||||
|
||||
selectToMousePositionUntilMouseUp: (event) ->
|
||||
{editor} = @props
|
||||
|
||||
@@ -1126,8 +1126,7 @@ class Editor extends Model
|
||||
#
|
||||
# Returns nothing
|
||||
addDecorationToBufferRowRange: (startBufferRow, endBufferRow, decoration) ->
|
||||
@batchUpdates =>
|
||||
@displayBuffer.addDecorationToBufferRowRange(startBufferRow, endBufferRow, decoration)
|
||||
@displayBuffer.addDecorationToBufferRowRange(startBufferRow, endBufferRow, decoration)
|
||||
|
||||
# Public: Removes a decoration from line numbers in a buffer row range
|
||||
#
|
||||
@@ -1137,8 +1136,7 @@ class Editor extends Model
|
||||
#
|
||||
# Returns nothing
|
||||
removeDecorationFromBufferRowRange: (startBufferRow, endBufferRow, decoration) ->
|
||||
@batchUpdates =>
|
||||
@displayBuffer.removeDecorationFromBufferRowRange(startBufferRow, endBufferRow, decoration)
|
||||
@displayBuffer.removeDecorationFromBufferRowRange(startBufferRow, endBufferRow, decoration)
|
||||
|
||||
# Public: Adds a decoration that tracks a {Marker}. 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