enhance(perf): insert and delete blocks (#9142)

* enhance(perf): improve performance for both insert and delete

* fix: remember cursor pos before executing the body in a transaction

Otherwise, the edit-block and position could be changed

* fix: disable delete-concat when there's no child or right sibling

---------

Co-authored-by: Gabriel Horner <97210743+logseq-cldwalker@users.noreply.github.com>
Co-authored-by: Gabriel Horner <gabriel@logseq.com>
This commit is contained in:
Tienson Qin
2023-05-09 17:24:09 +08:00
committed by GitHub
parent 4be671526b
commit 01479ef9da
15 changed files with 168 additions and 131 deletions

View File

@@ -927,8 +927,7 @@
[:span.warning.mr-1 {:title "Block ref invalid"}
(block-ref/->block-ref id)]))
[:span.warning.mr-1 {:title "Block ref invalid"}
(block-ref/->block-ref id)]
))
(block-ref/->block-ref id)]))
(defn inline-text
([format v]