 
 (def frame-updates (atom {}))
 
-(defn selection [cm] (.getSelections cm (.listSelections cm)))
+(defn selection [cm]
+  (map (fn [s]
+         (clojure.string/replace
+                 s
+                 "[object Object]" ""))
+       (.getSelections cm (.listSelections cm))))
 
 (defn before-change
   "Called before any change is applied to the editor."

       (.on cm "beforeChange" before-change)
       (.on cm "cursorActivity" on-cursor-activity)

       (.addKeyMap cm #js {"Ctrl-Enter" (fn [cm] (print cm) (evaluate (cm-selection-or-form cm)))})

       cm))))


         cm)))))

(defn cm-selection-or-form [cm]
  (let [selection (or (when (= (first (selection cm)) "")
                        (-> @editor-state
                            :editor
                            :text))
                      (first (selection cm)))]
    selection))

(defn create-editor!
