                         (let [cur (@ts :active-obj)
                               next (or (prev-tabset ts) (next-tabset ts))]
                           (when (and cur next (not= next ts))
-                            (rem! cur)
-                            (add! cur next)
-                            (active! cur)))))})
+                            (move-tab-to-tabset cur next)))))})
 
 (cmd/command {:command :tabs.next
               :desc "Tab: Next tab"

(cmd/command {:command :tabset.new
              :desc "Tabset: Add a tabset"
              :exec (fn []
                      (spawn-tabset)
                      (equalize-tabset-widths))})

(cmd/command {:command :tabs.focus-active
              :desc "Tab: focus active"


(append (object/->content canvas/canvas) (:content @multi))

(defn move-tab-to-tabset [obj ts]
  (rem! obj)
  (add! obj ts)
  (active! obj))

(cmd/command {:command :tabs.move-new-tabset
              :desc "Tab: Move tab to new tabset"
              :exec (fn []
                      (when-let [ts (ctx/->obj :tabset)]
                        (when-let [cur (@ts :active-obj)]
                          (let [new (cmd/exec! :tabset.new)]
                            (move-tab-to-tabset cur new)))))})

(cmd/command {:command :tabs.move-next-tabset
              :desc "Tab: Move tab to next tabset"
              :exec (fn []
