   # Set the attribute to the selection and try to extend as much
   # as possible existing ones
   #
-  setAttr: (thisSel)->
-    if not thisSel.isValid()
+  setAttr: (selection)->
+    if not selectin.isValid()
       throw new Error "Invalid selection"
 
   # Apply a delta to the object


  # Merge two words at position
  #
  # @param [Integer] n position of word where to perform merge. The merge will be done with the word at right (if any)
  #
  merge: (n) ->
    if 0 <= n < @_rte.words.length
      w = @getWord(n).trimRight()
      @deleteWords n
      @insert {startPos: {word: n, pos:0}}, w
    else
      throw new Error "Impossible to merge"


  getWord: (index) ->
    if not (0 <= index < @_rte.words.length)
      throw new Error "Index out of bounds #{index}"
    @_rte.words[index].word

  # Returns the *word objects* within boundaries
