           @listPaste()
         else
           return true
-      return false
-    return
+      return false # disable event propagation after execution of list-edit command
+
   listSelect: ->
     console.log 'list-select'
     ListEdit.selectCmd()
-    return
+
   listCut: ->
     console.log 'list-cut'
     ListEdit.cutCmd()
-    return
+
   listCopy: ->
     console.log 'list-copy'
     ListEdit.copyCmd()
-    return
+
   listPaste: ->
     console.log 'list-paste'
     ListEdit.pasteCmd()
-    return
-###

  setSelectionRange: (range) ->
    range = Range.fromObj(range)
    @$textArea.get(0).selectionStart = @characterIndexForPosition range.start
    @$textArea.get(0).selectionEnd = @characterIndexForPosition range.end

  delete: (range) ->
    range = Range.fromObj range
    rangeStartIx = @characterIndexForPosition range.start
    rangeEndIx = @characterIndexForPosition range.end
    rangeLength = rangeEndIx - rangeStartIx
    selStartIx = @$textArea.get(0).selectionStart
    selEndIx = @$textArea.get(0).selectionEnd
    # TODO: fix layout
    selStartIx = if selStartIx <= rangeStartIx then selStartIx else
                                                    if selStartIx < rangeEndIx then rangeStartIx else
                                                                                    selStartIx - rangeLength
    selEndIx = if selEndIx <= rangeStartIx then selEndIx else if selEndIx < rangeEndIx then rangeStartIx else selEndIx - rangeLength
    @setTextInRange range, ''
    @$textArea.get(0).selectionStart = selStartIx
    @$textArea.get(0).selectionEnd = selEndIx

  setTextInRange: (range, text) ->
    range = Range.fromObj range
    rangeStartIx = @characterIndexForPosition range.start
    rangeEndIx = @characterIndexForPosition range.end
    bufferText = @$textArea.val()
    @setText (bufferText.slice 0, rangeStartIx) + text + (bufferText.slice rangeEndIx, bufferText.length)



  notifications:
    hideTimer: null

    addNotification: (msg, bgColor, duration) ->
      $notification = $('#atom-Emulator .notification')
      $notification.text msg
