mirror of
https://github.com/logseq/logseq.git
synced 2026-05-28 14:39:48 +00:00
Merge branch 'master' of github.com:logseq/logseq
This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
(let [{:keys [block typ show?]} block-data
|
||||
block-id (or (:block/uuid (state/get-edit-block))
|
||||
(:block/uuid block))
|
||||
typ (or typ @commands/*current-command)]
|
||||
typ (or @commands/*current-command typ)]
|
||||
(editor-handler/set-block-timestamp! block-id
|
||||
typ
|
||||
text)
|
||||
|
||||
@@ -171,7 +171,8 @@
|
||||
(distinct))
|
||||
properties (->> properties
|
||||
(medley/map-kv (fn [k v]
|
||||
(let [v (string/trim v)]
|
||||
(let [v (string/trim v)
|
||||
k (string/replace k " " "_")]
|
||||
(cond
|
||||
(and (= "\"" (first v) (last v))) ; wrapped in ""
|
||||
[(string/lower-case k) (string/trim (subs v 1 (dec (count v))))]
|
||||
|
||||
@@ -1418,7 +1418,10 @@
|
||||
(when (and (if check-idle? (state/input-idle? repo) true)
|
||||
(not (state/get-editor-show-page-search?))
|
||||
(not (state/get-editor-show-page-search-hashtag?))
|
||||
(not (state/get-editor-show-block-search?)))
|
||||
(not (state/get-editor-show-block-search?))
|
||||
(not (state/get-editor-show-date-picker?))
|
||||
(not (state/get-editor-show-template-search?))
|
||||
(not (state/get-editor-show-input)))
|
||||
(state/set-editor-op! :auto-save)
|
||||
(try
|
||||
(let [input-id (state/get-edit-input-id)
|
||||
@@ -2366,8 +2369,9 @@
|
||||
|
||||
(defn- on-arrow-move-to-boundray
|
||||
[state input e direction]
|
||||
(when (or (and (= :left direction) (util/input-start? input))
|
||||
(and (= :right direction) (util/input-end? input)))
|
||||
(when (and (not (util/input-selected? input))
|
||||
(or (and (= :left direction) (util/input-start? input))
|
||||
(and (= :right direction) (util/input-end? input))))
|
||||
(move-to-block-when-cross-boundrary state e direction)))
|
||||
|
||||
(defn keydown-arrow-handler
|
||||
|
||||
@@ -765,6 +765,12 @@
|
||||
(= (count (.-value input))
|
||||
(.-selectionStart input)))))
|
||||
|
||||
#?(:cljs
|
||||
(defn input-selected?
|
||||
[input]
|
||||
(not= (.-selectionStart input)
|
||||
(.-selectionEnd input))))
|
||||
|
||||
#?(:cljs
|
||||
(defn get-selected-text
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user