branch: externals/pyim
commit 1aa514d6a8a5acdfd28a5e76917d52af43e9d04f
Author: Feng Shu <tuma...@163.com>
Commit: Feng Shu <tuma...@163.com>

    * pyim-preview.el (pyim-preview-refresh): Prefer use pyim-process.
---
 pyim-preview.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pyim-preview.el b/pyim-preview.el
index f645dc9d12..97de6ac6ef 100644
--- a/pyim-preview.el
+++ b/pyim-preview.el
@@ -75,8 +75,9 @@ pyim 会使用 Emacs overlay 机制在 *待输入buffer* 光标处高亮显示
 个预览字符串,让用户可以查看将要输入的字符串,这个函数用于更新这
 个字符串的内容。"
   (let* ((class (pyim-scheme-get-option (pyim-scheme-name) :class))
-         (candidates pyim-candidates)
-         (pos (1- (min pyim-candidate-position (length candidates))))
+         (candidates (pyim-process-get-candidates))
+         (pos (1- (min (pyim-process-get-candidate-position)
+                       (length candidates))))
          (preview (concat (pyim-outcome-get)
                           (nth pos candidates))))
     (when (memq class '(quanpin))

Reply via email to