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

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

[elpa] externals/pyim 41b5eb2 1/5: * pyim-cstring.el (pyim-cstring-spli


From: ELPA Syncer
Subject: [elpa] externals/pyim 41b5eb2 1/5: * pyim-cstring.el (pyim-cstring-split-to-string-1): 修复插入分割符位置不对的问题。
Date: Wed, 8 Dec 2021 00:57:31 -0500 (EST)

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

    * pyim-cstring.el (pyim-cstring-split-to-string-1): 修复插入分割符位置不对的问题。
---
 pyim-cstring.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pyim-cstring.el b/pyim-cstring.el
index d373508..6582ac1 100644
--- a/pyim-cstring.el
+++ b/pyim-cstring.el
@@ -172,9 +172,9 @@ CHINESE-STRING 分词,得到一个词条 alist,这个 alist 的元素都是
 
     ;; 在分词的位置插入空格或者用户指定的分隔符。
     (dotimes (i str-length)
-      (when (member (1+ i) position-list)
+      (when (and (> i 0) (member i position-list))
         (push (or separator " ") result))
-      (push (substring chinese-string i (1+ i))  result))
+      (push (substring chinese-string i (1+ i)) result))
     (setq result (nreverse result))
     (mapconcat #'identity result "")))
 



reply via email to

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