fix: at times can't indent and out-dent an existing bullet

Related to #1386
This commit is contained in:
Tienson Qin
2021-03-08 12:26:00 +08:00
parent c6132c75c9
commit 8963aa5cb9
2 changed files with 8 additions and 4 deletions

View File

@@ -2015,7 +2015,8 @@
;; :last-start-pos @last-start-pos})
file-path (:file/path file)
file-content (db/get-file file-path)
new-content (utf8/insert! file-content start-pos old-end-pos (apply str (map :block/content blocks)))]
new-content (utf8/insert! file-content start-pos old-end-pos (apply str (map :block/content blocks)))
blocks (map (fn [b] (dissoc b :block/children)) blocks)]
(profile
"Indent/outdent: "
(repo-handler/transact-react-and-alter-file!