branch: externals/pyim commit b764d12b76c9b348540c4ae6ff32f0de6246a55d Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@163.com>
Improve pyim-process--entered-to-be-translated --- pyim-process.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pyim-process.el b/pyim-process.el index f5289f03b4..f336f84192 100644 --- a/pyim-process.el +++ b/pyim-process.el @@ -740,13 +740,14 @@ xiaolifeidao 中,比如五笔输入法,就不成立,好在型码输入法一般不需要多次 选择。" (let* ((imobj (pyim-process-get-first-imobj)) - (length-selected-word + (length-selected-word-in-this-step (- (length (pyim-outcome-get)) (length (pyim-outcome-get 1))))) - (when (< length-selected-word (length imobj)) - (string-join (mapcar (lambda (w) - (concat (nth 2 w) (nth 3 w))) - (nthcdr length-selected-word imobj)))))) + (when (< length-selected-word-in-this-step (length imobj)) + (string-join + (mapcar (lambda (w) + (concat (nth 2 w) (nth 3 w))) + (nthcdr length-selected-word-in-this-step imobj)))))) (defun pyim-process-create-word (word &optional prepend wordcount-handler criteria) "将中文词条 WORD 添加编码后,保存到用户选择过的词生成的缓存中。