diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 972bb723c..084c202db 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -2325,15 +2325,6 @@ (= "#" (util/nth-safe value (dec pos))))) (state/set-editor-show-page-search-hashtag! false) - (or - (surround-by? input "#" " ") - (surround-by? input "#" :end) - (= key "#")) - (do - (commands/handle-step [:editor/search-page-hashtag]) - (state/set-last-pos! (:pos (util/get-caret-pos input))) - (reset! commands/*slash-caret-pos (util/get-caret-pos input))) - (and (contains? (set/difference (set (keys reversed-autopair-map)) #{"`"}) @@ -2359,6 +2350,15 @@ :else nil)) + (or + (surround-by? input "#" " ") + (surround-by? input "#" :end) + (= key "#")) + (do + (commands/handle-step [:editor/search-page-hashtag]) + (state/set-last-pos! (:pos (util/get-caret-pos input))) + (reset! commands/*slash-caret-pos (util/get-caret-pos input))) + (let [sym "$"] (and (= key sym) (>= (count value) 1) diff --git a/src/main/frontend/state.cljs b/src/main/frontend/state.cljs index e10b23ce6..30c5ac314 100644 --- a/src/main/frontend/state.cljs +++ b/src/main/frontend/state.cljs @@ -464,8 +464,7 @@ (defn set-editor-show-page-search! [value] - (set-state! :editor/show-page-search? value) - (set-state! :editor/show-page-search-hashtag? false)) + (set-state! :editor/show-page-search? value)) (defn get-editor-show-page-search? []