Skip to content

Commit

Permalink
Merge branch 'feat/outliner-core' of github.com:logseq/logseq into fe…
Browse files Browse the repository at this point in the history
…at/outliner-core
  • Loading branch information
defclass committed Apr 15, 2021
2 parents a8fcbae + a96d65a commit 31c4dc2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/main/frontend/handler/editor.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2014,13 +2014,15 @@
(= (util/nth-safe value (dec current-pos)) commands/slash))
(do
(reset! *slash-caret-pos nil)
(reset! *show-commands false))
(reset! *show-commands false)
(.setRangeText input "" (dec current-pos) current-pos))

(and (> current-pos 1)
(= (util/nth-safe value (dec current-pos)) commands/angle-bracket))
(do
(reset! *angle-bracket-caret-pos nil)
(reset! *show-block-commands false))
(reset! *show-block-commands false)
(.setRangeText input "" (dec current-pos) current-pos))

;; pair
(and
Expand Down Expand Up @@ -2262,7 +2264,7 @@
(let [repo (state/get-current-repo)
page (or (db/entity [:block/name (state/get-current-page)])
(db/entity [:block/original-name (state/get-current-page)])
(:block/page (state/get-edit-block)))
(:block/page (db/entity (:db/id(state/get-edit-block)))))
file (:block/file page)
copied-blocks (state/get-copied-blocks)
copied-block-tree (:copy/block-tree copied-blocks)]
Expand Down
3 changes: 2 additions & 1 deletion src/main/frontend/state.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@

(defn editing?
[]
(some? (get-edit-input-id)))
(let [input (get-input)]
(and input (= input (.-activeElement js/document)))))

(defn get-edit-content
[]
Expand Down

0 comments on commit 31c4dc2

Please sign in to comment.