Skip to content

Commit

Permalink
fix: can't auto change 【【 on Windows with Sougou Chinese input
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Jun 9, 2021
1 parent 93ffaa8 commit 0061657
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/frontend/handler/editor.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -2463,15 +2463,15 @@
value (gobj/get input "value")
c (util/nth-safe value (dec current-pos))]
(when-not (state/get-editor-show-input)
(when (and (= k "")
(when (and (or (= k "[") (= k ""))
(> current-pos 0)
(= "" (util/nth-safe value (dec (dec current-pos)))))
(commands/handle-step [:editor/input "[[]]" {:last-pattern "【【"
:backward-pos 2}])
(commands/handle-step [:editor/search-page])
(reset! commands/*slash-caret-pos (util/get-caret-pos input)))

(when (and (= k "")
(when (and (or (= k "(") (= k ""))
(> current-pos 0)
(= "" (util/nth-safe value (dec (dec current-pos)))))
(commands/handle-step [:editor/input "(())" {:last-pattern "(("
Expand Down

0 comments on commit 0061657

Please sign in to comment.