fix: do autopair by default for pairs with same char (eg. $$)

pull/645/head
Haoji Xu 2020-09-08 02:04:30 +08:00 committed by Tienson Qin
parent e59b82d577
commit f961d369c1
1 changed files with 5 additions and 5 deletions

View File

@ -503,6 +503,11 @@
(= (editor-handler/get-previous-input-chars input 2) (str key key)))
nil
(contains? (set (keys editor-handler/autopair-map)) key)
(do
(util/stop e)
(editor-handler/autopair input-id key format nil))
(and
(contains? (set (keys editor-handler/reversed-autopair-map)) key)
(= (editor-handler/get-current-input-char input) key))
@ -510,11 +515,6 @@
(util/stop e)
(util/cursor-move-forward input 1))
(contains? (set (keys editor-handler/autopair-map)) key)
(do
(util/stop e)
(editor-handler/autopair input-id key format nil))
:else
nil))))
(mixins/on-key-up