fix: don't autocomplete ^

Resolved #521
This commit is contained in:
Tienson Qin
2020-11-24 21:10:49 +08:00
parent 416e36ee1b
commit 2565c3b08b
2 changed files with 12 additions and 1 deletions

View File

@@ -557,6 +557,16 @@
true)))
(commands/simple-insert! input-id "$$" {:backward-pos 2})
(let [sym "^"]
(and (= key sym)
(>= (count value) 1)
(> pos 0)
(= (nth value (dec pos)) sym)
(if (> (count value) pos)
(not= (nth value pos) sym)
true)))
(commands/simple-insert! input-id "^^" {:backward-pos 2})
:else
nil))))
(mixins/on-key-up