   compare: (otherSelection) ->
     @getBufferRange().compare(otherSelection.getBufferRange())
 
-  addDecoration: ->
-    properties = @marker.getAttributes()
-    @decoration = {type: 'highlight', class: @getDecorationClass(properties)}
+  addDecoration: ({highlighted})->
+    @delayUnhighlight() if highlighted
+
+    @decoration = {type: 'highlight', class: @getDecorationClass(highlighted)}
     @editor.addDecorationForMarker(@marker, @decoration)
-    @delayUnhighlight() if properties.highlighted
-
-  updateDecoration: (newProperties) ->
-    newDecoration = {type: 'highlight', class: @getDecorationClass(newProperties)}
+
+  updateDecoration: ({highlighted}) ->
+    @delayUnhighlight() if highlighted
+
+    newDecoration = {type: 'highlight', class: @getDecorationClass(highlighted)}
     @editor.updateDecorationForMarker(@marker, @decoration, newDecoration)
     @decoration = newDecoration
-    @delayUnhighlight() if newProperties.highlighted
 
   delayUnhighlight: ->
+    @unhighlight()
+    @unhighlightTimeout = setTimeout((=> @unhighlight()), 1000)
+
+  highlight: ->
+    @updateDecoration(highlighted: true)
+
+  unhighlight: ->
+    @updateDecoration(highlighted: false)
     clearTimeout(@unhighlightTimeout)
-    @unhighlightTimeout = setTimeout =>
-      @marker.setAttributes(highlighted: false)
-    , 1000
-
-  getDecorationClass: (properties) ->
+
+  getDecorationClass: (highlighted) ->
     klass = 'selection'
-    klass += ' highlighted' if properties?.highlighted
+    klass += ' highlighted' if highlighted
     klass
 
   screenRangeChanged: ->
     screenRange = @getScreenRange()
     @emit 'screen-range-changed', screenRange
     @editor.selectionScreenRangeChanged(this)
-
-  markerChanged: ({oldProperties, newProperties}) ->
-    @updateDecoration(newProperties) if newProperties?.highlighted != oldProperties?.highlighted

  constructor: ({@cursor, @marker, @editor, id}) ->
    @assignId(id)
    @cursor.selection = this
    @addDecoration()

    @marker.on 'changed', => @screenRangeChanged()
    @marker.bufferMarker.on 'changed', (e) => @markerChanged(e)
    @marker.on 'destroyed', =>
      @destroyed = true
      @editor.removeSelection(this)

    @needsAutoscroll = options.autoscroll
    options.reversed ?= @isReversed()
    @editor.destroyFoldsIntersectingBufferRange(bufferRange) unless options.preserveFolds
    @updateDecoration(options)
    @modifySelection =>
      @cursor.needsAutoscroll = false if @needsAutoscroll?
      @marker.setBufferRange(bufferRange, options)
