 
 (defmethod editors/create-editor :git [_ path]
   (when (= (.getName (io/file path)) git-name)
-    (let [; create the pane
+    (let [; get the path of the parent directory
+          path (-> path io/file .getParentFile .getCanonicalPath)
+          ; create the pane
           content (create-content)
-          sidebar (create-sidebar content)
+          sidebar (create-sidebar content (git-file path))
           git-pane (s/border-panel
-                     :west (s/scrollable sidebar :size [200 :by 0])
+                     :west (s/scrollable sidebar
+                                         :size [200 :by 0]
+                                         :hscroll :never)
                      :center (s/scrollable content))
-          ; get the path of the parent directory
-          path (-> path io/file .getParentFile .getCanonicalPath)
           ; create the actions and widgets
           actions (create-actions)
           widgets (create-widgets actions)

                         :content-type "text/html")
      (.setEditorKit kit))))

(def ^:const git-name "*Git*")

(defn git-project?
  [path]
  (.exists (io/file path ".git")))

(def ^:dynamic *widgets* [:pull :push :configure])


  (:import [javax.swing.event HyperlinkEvent$EventType TreeSelectionListener]
           [javax.swing.text.html HTMLEditorKit StyleSheet]
           [javax.swing.tree DefaultMutableTreeNode DefaultTreeModel
            TreeSelectionModel]
           [org.eclipse.jgit.api Git]
           [org.eclipse.jgit.internal.storage.file FileRepository]))

(def ^:const git-name "*Git*")
(def ^:const max-commits 50)

(defn update-content!
  [content commit]
  (doto content
    (.setText "")
    (.setCaretPosition 0)))

(defn commit-node
  [commit]
  (proxy [DefaultMutableTreeNode] [commit]
    (toString [] (.getShortMessage commit))))

(defn root-node
  [f]
  (let [repo (FileRepository. f)
        git (Git. repo)
        commit-objects (-> git .log (.setMaxCount max-commits) .call .iterator)
        commits (iterator-seq commit-objects)]
    (proxy [DefaultMutableTreeNode] []
      (getChildAt [i] (commit-node (nth commits i)))
      (getChildCount [] (count commits)))))

(defn create-sidebar
  [content f]
  (doto (s/tree :id :git-sidebar)
    (.setRootVisible false)
    (.setShowsRootHandles false)
    (.setModel (DefaultTreeModel. (root-node f)))
    (.addTreeSelectionListener
      (reify TreeSelectionListener
        (valueChanged [this e]
