Skip to content
This repository
Browse code

fix project repl last focused repl bug

  • Loading branch information...
commit 8df079576cd4a85efa13d5fbb562ca0cb6d447ab 1 parent 41c55f4
Jon Rose authored September 10, 2012
4  resources/default.clj
@@ -13,7 +13,7 @@
13 13
 	:auto-indent true
14 14
 	:eol-marker false
15 15
 	:font "MENLO-15-BOLD"
16  
-	:tab-size 1
  16
+	:tab-size 2
17 17
 	:hyperlinks-enabled false
18 18
 	:mark-occurences-color "#ADA6A9"
19 19
 	:paint-mark-occurences-border true
@@ -37,7 +37,7 @@
37 37
 	:auto-indent true
38 38
 	:eol-marker false
39 39
 	:font "MENLO-15-BOLD"
40  
-	:tab-size 1
  40
+	:tab-size 2
41 41
 	:mark-occurences-color "#ADA6A9"
42 42
  	 :paint-mark-occurences-border true
43 43
 	:matched-bracket-bg-color [80 240 70 50]
2  src/sketchpad/core.clj
@@ -131,7 +131,7 @@
131 131
     (setup-tree app-atom)
132 132
 
133 133
     ;; this should happen when the repl tabbed panel is created probably
134  
-    (repl.info/attach-repl-info-handler app-atom)
  134
+;    (repl.info/attach-repl-info-handler app-atom)
135 135
     ;; global
136 136
     (add-visibility-shortcut app)))
137 137
 
2  src/sketchpad/menu/source.clj
@@ -98,7 +98,7 @@
98 98
 	(seesaw/invoke-later
99 99
 		(let [project (get @(:projects @state/app) (first (tree.utils/get-selected-projects)))
100 100
 ;			_ (println project)
101  
-     		 last-uuid @(:last-focused-repl project)
  101
+     		 	last-uuid @(:last-focused-repl project)
102 102
 			repls (tab/current-repls)
103 103
 			repl (get repls last-uuid)]
104 104
 			(when-not (and
2  src/sketchpad/project/create.clj
@@ -19,7 +19,7 @@
19 19
     (spit (java.io.File. (str (:path project-map) "/" (:clean-name project-map) "/src/" (:clean-name project-map)) "core.clj") file-text)))
20 20
 
21 21
 (defn- make-dirs [project-map]
22  
-	(.mkdirs (java.io.File. (:path project-map) (str (:project-name project-map) "/src/" (:clean-name project-map)))))
  22
+	(.mkdirs (java.io.File. (:path project-map) (str (:project project-map) "/src/" (:clean-name project-map)))))
23 23
 
24 24
 (defn- new-project-clj [project-map]
25 25
   (let [file-text (:project-clj project-map)]
5  src/sketchpad/project/project.clj
@@ -114,8 +114,9 @@
114 114
   (swap! buffers dissoc (:uuid buffer))))
115 115
 
116 116
 (defn add-repl-to-project [project-path repl]
117  
-	(let [repls (get-in @(@state/app :projects) [project-path :repls])]
118  
-  (swap! repls assoc (:uuid repl) repl)))
  117
+  (let [repls (get-in @(@state/app :projects) [project-path :repls])]
  118
+    (reset! (get-in @(@state/app :projects) [project-path :last-focused-repl]) (:uuid repl))
  119
+    (swap! repls assoc (:uuid repl) repl)))
119 120
 
120 121
 (defn remove-repl-from-project [repl]
121 122
   	(let [buffers (get-in @(@state/app :projects) [(:project repl) :repls])]
1  src/sketchpad/repl/info.clj
@@ -41,7 +41,6 @@
41 41
 
42 42
 (defn attach-repl-info-handler [app-atom]
43 43
 	(let [tabbed-panel (get-in (:repl-tabbed-panel @app-atom) [:component :container])]
44  
-		(listen tabbed-panel :selection (partial update-repl-title-label! tabbed-panel))
45 44
   		(listen tabbed-panel :selection (partial update-repl-info-label! tabbed-panel))))
46 45
 
47 46
 (defn info-panel-bg []

0 notes on commit 8df0795

Please sign in to comment.
Something went wrong with that request. Please try again.