emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/pyim f168254: * pyim-autoselector.el (pyim-autoselector


From: ELPA Syncer
Subject: [elpa] externals/pyim f168254: * pyim-autoselector.el (pyim-autoselector-xingma): Delete wrong code when input next char.
Date: Mon, 26 Apr 2021 07:57:10 -0400 (EDT)

branch: externals/pyim
commit f1682543c2266b0b83a123b27190e67019f5590b
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    * pyim-autoselector.el (pyim-autoselector-xingma): Delete wrong code when 
input next char.
---
 pyim-autoselector.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pyim-autoselector.el b/pyim-autoselector.el
index 3c8e7e6..b082abd 100644
--- a/pyim-autoselector.el
+++ b/pyim-autoselector.el
@@ -75,6 +75,12 @@ entered (nihaom) 的第一个候选词。
              ;; 因为这种情况往往是用户输入有误,自动上屏之后,调整输入就变得麻烦了。
              (not (equal entered (car pyim-candidates))))
         '(:select current))
+       ((and (> (length entered) n)
+             (equal (substring entered 0 n)
+                    (car pyim-candidates-last)))
+        ;; 自动清除错误输入模式,类似微软五笔:敲第五个字母的时候,前面四个字母自
+        ;; 动清除。
+        '(:select last :replace-with ""))
        ((> (length entered) n)
         '(:select last))
        (t nil)))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]