branch: externals/pyim
commit 9a6a4299e1312ed17d074072a0199eae5a583e85
Author: Feng Shu <[email protected]>
Commit: Feng Shu <[email protected]>
Fix: % 字符触发 Not enough arguments for format string (Issue #491)
---
pyim-page.el | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/pyim-page.el b/pyim-page.el
index fab3f3736b..9ca4c02f2d 100644
--- a/pyim-page.el
+++ b/pyim-page.el
@@ -311,10 +311,9 @@ pyim-page 的核心的功能,为此增加代码的复杂度和测试的难度
(cl-defmethod pyim-page-show (string _position (_tooltip (eql minibuffer)))
"使用 minibuffer 来显示 STRING。"
(let ((max-mini-window-height (+ pyim-page-length 2))
- (message-log-max nil)
- (string (replace-regexp-in-string "%" "%%" string)))
+ (message-log-max nil))
(if (not (eq (selected-window) (minibuffer-window)))
- (message string)
+ (message (replace-regexp-in-string "%" "%%" string))
(message nil)
;; 在类似 vertico-posframe 这样的环境中,posframe window-point 同步问题不
;; 太好处理,这里使用一个简单粗暴的方式:在输入过程中,隐藏真实的 cursor