       @selection.removeAllRanges()
       @selection.addRange range
       which = if direction == forward then "start" else "end"
-      @selection.extend original["#{which}Container"], original["#{which}Offset"],
+      @selection.extend original["#{which}Container"], original["#{which}Offset"]
 
   # Run a movement command.
   runMovement: (movement) ->

    r = t = selection.getRangeAt 0
    if selection.type == "Range"
      r = t.cloneRange()
      r.collapse(@getDirection() == backward)
    t = r.startContainer
    t = t.childNodes[r.startOffset] if t.nodeType == 1
    o = t


# To do:
# - caret mode

enterInsertMode = ->
  new InsertMode { badge: "I", blurOnEscape: false }
