fix(editor): cursor jump to the start when idle

Resolved #864
This commit is contained in:
Tienson Qin
2020-12-10 22:57:14 +08:00
parent 43c76e6c16
commit 914031649e
6 changed files with 88 additions and 86 deletions

View File

@@ -797,16 +797,16 @@
(if (= (:repo project) current-repo)
(conj acc (merge project new-kvs))
(conj acc project)))
[]
projects)]
[]
projects)]
(set-state! [:me :projects] new-projects))))
(defn remove-current-project
[]
(when-let [current-repo (get-current-repo)]
(update-state! [:me :projects]
(fn [projects]
(remove #(= (:repo %) current-repo) projects)))))
(fn [projects]
(remove #(= (:repo %) current-repo) projects)))))
(defn set-indexedb-support!
[value]
@@ -939,7 +939,7 @@
(defn set-published-pages
[pages]
(when-let [repo (get-current-repo)]
(set-state! [:me :published-pages repo] pages)))
(set-state! [:me :published-pages repo] pages)))
(defn reset-published-pages
[]