     @editSession.buffer.getTextInRange(@getBufferRange())
 
   clear: ->
-    @modifyScreenRange =>
-      @anchor?.destroy()
-      @anchor = null
+    @anchor?.destroy()
+    @anchor = null
+    @emitChangeScreenRangeEvent()
 
   selectWord: ->
     @setBufferRange(@cursor.getCurrentWordBufferRange())

    { start, end } = screenRange
    [start, end] = [end, start] if options.reverse

    @modifyScreenRange =>
      @placeAnchor() unless @anchor
      @modifySelection =>
        @anchor.setScreenPosition(start)
        @cursor.setScreenPosition(end)

  setBufferRange: (bufferRange, options={}) ->
    bufferRange = Range.fromObject(bufferRange)
    { start, end } = bufferRange
    [start, end] = [end, start] if options.reverse

    @modifyScreenRange =>
      @editSession.destroyFoldsIntersectingBufferRange(bufferRange) unless options.preserveFolds
      @placeAnchor() unless @anchor
      @modifySelection =>
        @anchor.setBufferPosition(start, options)
        @cursor.setBufferPosition(end, options)

  getBufferRange: ->
    if @anchor

    @cursor.selection = this

    @cursor.on 'change-screen-position.selection', (e) =>
      @emitChangeScreenRangeEvent() unless e.bufferChanged

    @cursor.on 'destroy.selection', =>
      @cursor = null
