mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Highlight selection w/ animation when autoscroll is true
This commit is contained in:
@@ -71,6 +71,16 @@ class SelectionView extends View
|
||||
|
||||
autoscrolled: ->
|
||||
@selection.autoscrolled()
|
||||
@highlight()
|
||||
|
||||
highlight: ->
|
||||
@unhighlight()
|
||||
@addClass('highlighted')
|
||||
clearTimeout(@unhighlightTimeout)
|
||||
@unhighlightTimeout = setTimeout((=> @unhighlight()), 1000)
|
||||
|
||||
unhighlight: ->
|
||||
@removeClass('highlighted')
|
||||
|
||||
remove: ->
|
||||
@editor.removeSelectionView(this)
|
||||
|
||||
Reference in New Issue
Block a user