mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Rename updateAppearance to updateDisplay
This commit is contained in:
@@ -863,7 +863,7 @@ describe "Editor", ->
|
||||
expect(selectionView.regions.length).toBe 3
|
||||
expect(selectionView.find('.selection').length).toBe 3
|
||||
|
||||
selectionView.updateAppearance()
|
||||
selectionView.updateDisplay()
|
||||
expect(selectionView.regions.length).toBe 3
|
||||
expect(selectionView.find('.selection').length).toBe 3
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class CursorView extends View
|
||||
|
||||
initialize: (@cursor, @editor) ->
|
||||
@cursor.on 'change-screen-position.cursor-view', (screenPosition, { bufferChange, autoscroll }) =>
|
||||
@updateAppearance({autoscroll})
|
||||
@updateDisplay({autoscroll})
|
||||
@removeIdleClassTemporarily() unless bufferChange
|
||||
@trigger 'cursor-move', {bufferChange}
|
||||
|
||||
@@ -23,7 +23,7 @@ class CursorView extends View
|
||||
|
||||
afterAttach: (onDom) ->
|
||||
return unless onDom
|
||||
@updateAppearance()
|
||||
@updateDisplay()
|
||||
@editor.syncCursorAnimations()
|
||||
|
||||
remove: ->
|
||||
@@ -31,7 +31,7 @@ class CursorView extends View
|
||||
@cursor.off('.cursor-view')
|
||||
super
|
||||
|
||||
updateAppearance: (options={}) ->
|
||||
updateDisplay: (options={}) ->
|
||||
autoscroll = options.autoscroll ? true
|
||||
screenPosition = @getScreenPosition()
|
||||
pixelPosition = @getPixelPosition()
|
||||
|
||||
@@ -673,11 +673,11 @@ class Editor extends View
|
||||
|
||||
updateCursorViews: ->
|
||||
for cursorView in @getCursorViews()
|
||||
cursorView.updateAppearance()
|
||||
cursorView.updateDisplay()
|
||||
|
||||
updateSelectionViews: ->
|
||||
for selectionView in @getSelectionViews()
|
||||
selectionView.updateAppearance()
|
||||
selectionView.updateDisplay()
|
||||
|
||||
syncCursorAnimations: ->
|
||||
for cursorView in @getCursorViews()
|
||||
|
||||
@@ -12,11 +12,11 @@ class SelectionView extends View
|
||||
|
||||
initialize: ({@editor, @selection} = {}) ->
|
||||
@regions = []
|
||||
@selection.on 'change-screen-range', => @updateAppearance()
|
||||
@selection.on 'change-screen-range', => @updateDisplay()
|
||||
@selection.on 'destroy', => @remove()
|
||||
@updateAppearance()
|
||||
@updateDisplay()
|
||||
|
||||
updateAppearance: ->
|
||||
updateDisplay: ->
|
||||
@clearRegions()
|
||||
range = @getScreenRange()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user