fix: cmd-k search deletes unsaved changes

fixes https://github.com/logseq/db-test/issues/27
This commit is contained in:
Tienson Qin
2024-08-23 14:55:47 +08:00
parent f11932e0c5
commit 69816cdd2b
2 changed files with 8 additions and 6 deletions

View File

@@ -32,7 +32,7 @@
(defn- search
[mode]
(editor-handler/escape-editing false)
(editor-handler/escape-editing true)
(if (state/get-search-mode)
(js/setTimeout #(route-handler/go-to-search! mode) 128)
(route-handler/go-to-search! mode)))
@@ -454,7 +454,7 @@
:command/run {:binding "mod+shift+1"
:inactive (not (util/electron?))
:fn #(do
(editor-handler/escape-editing)
(editor-handler/escape-editing true)
(state/pub-event! [:command/run]))}
:go/home {:binding "g h"