       if not (sel.in thisSel)
         tmpSelections.push sel
         continue
-      console.log sel.print()+" in "+thisSel.print()
+      # console.log sel.print()+" in "+thisSel.print()
       sel.unbind()
       @rte.removeSel sel
 

    for sel, index in selections
      if not (thisSel.atLeftOf sel)
        continue
      console.log thisSel.print()+" at left of "+sel.print()
      [left, right] = sel.unbind()
      sel.leftPos = 0
      sel.bind wordToBound, right

  merge: (index) ->
    if 0 <= index < @getWords(0).length
      word = @getWord index
      # use slice to force copy of array
      [selLeft, selRight] = [word.left.slice(), word.right.slice()]
      for selection in  _.uniq(selLeft.concat(selRight))
        # console.log "Merge — unbinding " + selection.print()
        #selection.unbind()
        @removeSel selection

      word.left = word.right = []
      # remove word at position index
      @deleteWords index
      # insert its content at position where is used to be
      pos = absoluteFromRelative index, 0, @

      @insert pos, word.word.trimRight()

      # the new word is here
      newWord = @getWord index

      # console.log "Merge — before selLeft", selLeft
      for selection in selLeft
        # console.log "Merge — rebinding " + selection.print()
        selection.rebind newWord, null
        @pushSel selection
      # # console.log "Merge — before selRight", selRight
      for selection in selRight
        # console.log "Merge — rebinding " + selection.print()
        selection.rebind null, newWord
        @pushSel selection
    else
      throw new Error "Impossible to merge"
