Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c69c254512 | |||
| 6378c4910b | |||
| 0c5d69e7b2 | |||
| 9940d53f79 | |||
| c814f3618a | |||
| 1ec1171c9b |
+4
-12
@@ -6,8 +6,6 @@
|
||||
[lazygitclj.git :as git]
|
||||
[clojure.string :as str]))
|
||||
|
||||
(def temp tui/run)
|
||||
|
||||
;; === Model ===
|
||||
|
||||
(defn load-git-data []
|
||||
@@ -58,7 +56,7 @@
|
||||
s))
|
||||
|
||||
(defn get-current-diff
|
||||
"Change doc string for test"
|
||||
"Get the diff for the currently selected item based on panel and cursor."
|
||||
[model]
|
||||
(let [panel (:panel model)
|
||||
items (current-items model)
|
||||
@@ -92,8 +90,7 @@
|
||||
;; === Update ===
|
||||
|
||||
(defn update-diff [model]
|
||||
;; never update lol
|
||||
model)
|
||||
(assoc model :diff (get-current-diff model)))
|
||||
|
||||
(defn initial-model []
|
||||
(let [base (merge
|
||||
@@ -882,20 +879,15 @@
|
||||
:else
|
||||
background)))
|
||||
|
||||
(defn test-view-2 [& args]
|
||||
[:box "foo"])
|
||||
|
||||
;; === Main ===
|
||||
|
||||
(def temp2 get-current-diff)
|
||||
|
||||
(defn -main [& _args]
|
||||
(if (git/repo-root)
|
||||
(do
|
||||
(println (str "String with initial model: " (initial-model)))
|
||||
(println "Starting lazygitclj...")
|
||||
(tui/run {:init (initial-model)
|
||||
:update update-model
|
||||
:view test-view-2})
|
||||
:view view})
|
||||
(println "Goodbye!"))
|
||||
(do
|
||||
(println "Error: Not a git repository")
|
||||
|
||||
Reference in New Issue
Block a user