Permalink
Browse files

fix project repl last focused repl bug

  • Loading branch information...
1 parent 41c55f4 commit 8df079576cd4a85efa13d5fbb562ca0cb6d447ab @ghostandthemachine committed Sep 10, 2012
View
@@ -13,7 +13,7 @@
:auto-indent true
:eol-marker false
:font "MENLO-15-BOLD"
- :tab-size 1
+ :tab-size 2
:hyperlinks-enabled false
:mark-occurences-color "#ADA6A9"
:paint-mark-occurences-border true
@@ -37,7 +37,7 @@
:auto-indent true
:eol-marker false
:font "MENLO-15-BOLD"
- :tab-size 1
+ :tab-size 2
:mark-occurences-color "#ADA6A9"
:paint-mark-occurences-border true
:matched-bracket-bg-color [80 240 70 50]
View
@@ -131,7 +131,7 @@
(setup-tree app-atom)
;; this should happen when the repl tabbed panel is created probably
- (repl.info/attach-repl-info-handler app-atom)
+; (repl.info/attach-repl-info-handler app-atom)
;; global
(add-visibility-shortcut app)))
@@ -98,7 +98,7 @@
(seesaw/invoke-later
(let [project (get @(:projects @state/app) (first (tree.utils/get-selected-projects)))
; _ (println project)
- last-uuid @(:last-focused-repl project)
+ last-uuid @(:last-focused-repl project)
repls (tab/current-repls)
repl (get repls last-uuid)]
(when-not (and
@@ -19,7 +19,7 @@
(spit (java.io.File. (str (:path project-map) "/" (:clean-name project-map) "/src/" (:clean-name project-map)) "core.clj") file-text)))
(defn- make-dirs [project-map]
- (.mkdirs (java.io.File. (:path project-map) (str (:project-name project-map) "/src/" (:clean-name project-map)))))
+ (.mkdirs (java.io.File. (:path project-map) (str (:project project-map) "/src/" (:clean-name project-map)))))
(defn- new-project-clj [project-map]
(let [file-text (:project-clj project-map)]
@@ -114,8 +114,9 @@
(swap! buffers dissoc (:uuid buffer))))
(defn add-repl-to-project [project-path repl]
- (let [repls (get-in @(@state/app :projects) [project-path :repls])]
- (swap! repls assoc (:uuid repl) repl)))
+ (let [repls (get-in @(@state/app :projects) [project-path :repls])]
+ (reset! (get-in @(@state/app :projects) [project-path :last-focused-repl]) (:uuid repl))
+ (swap! repls assoc (:uuid repl) repl)))
(defn remove-repl-from-project [repl]
(let [buffers (get-in @(@state/app :projects) [(:project repl) :repls])]
@@ -41,7 +41,6 @@
(defn attach-repl-info-handler [app-atom]
(let [tabbed-panel (get-in (:repl-tabbed-panel @app-atom) [:component :container])]
- (listen tabbed-panel :selection (partial update-repl-title-label! tabbed-panel))
(listen tabbed-panel :selection (partial update-repl-info-label! tabbed-panel))))
(defn info-panel-bg []

0 comments on commit 8df0795

Please sign in to comment.