Revision: fd86ad8c84d1
Author: KIHARA Hideto <[email protected]>
Date: Thu Aug 9 05:50:29 2012
Log: Fix bug that last pending rk is not cleared on preedit.
* scm/tutcode.scm
- (tutcode-key-press-handler-internal):
Update preedit when pending rk becomes empty.
http://code.google.com/p/uim/source/detail?r=fd86ad8c84d1
Modified:
/scm/tutcode.scm
=======================================
--- /scm/tutcode.scm Thu Aug 9 03:51:05 2012
+++ /scm/tutcode.scm Thu Aug 9 05:50:29 2012
@@ -5863,14 +5863,17 @@
(let ((pc (tutcode-find-descendant-context c)))
(case (tutcode-context-state pc)
((tutcode-state-on)
- (tutcode-proc-state-on pc key key-state)
- (if (or (and tutcode-show-pending-rk?
- (pair? (rk-context-seq (tutcode-context-rk-context
pc))))
- ;; ¸ò¤¼½ñ¤ÊÑ´¹¤äÉô¼ó¹çÀ®ÊÑ´¹³«»Ï¡£¢¤¤ä¢¥¤òɽ¼¨¤¹¤ë
- (tutcode-state-has-preedit? c)
- ;; ʸ»ú¿ô»ØÄê¸åÃÖ·¿¸ò¤¼½ñ¤ÊÑ´¹¤ÎºÆµ¢³Ø½¬¥¥ã¥ó¥»¥ë
- (not (eq? (tutcode-find-descendant-context c) pc)))
- (tutcode-update-preedit pc)))
+ (let* ((rkc (tutcode-context-rk-context pc))
+ (prev-pending-rk (rk-context-seq rkc)))
+ (tutcode-proc-state-on pc key key-state)
+ (if (or (and tutcode-show-pending-rk?
+ (or (pair? (rk-context-seq rkc))
+ (pair? prev-pending-rk))) ; prev-pending-rk¾ÃµîÍÑ
+ ;; ¸ò¤¼½ñ¤ÊÑ´¹¤äÉô¼ó¹çÀ®ÊÑ´¹³«»Ï¡£¢¤¤ä¢¥¤òɽ¼¨¤¹¤ë
+ (tutcode-state-has-preedit? c)
+ ;; ʸ»ú¿ô»ØÄê¸åÃÖ·¿¸ò¤¼½ñ¤ÊÑ´¹¤ÎºÆµ¢³Ø½¬¥¥ã¥ó¥»¥ë
+ (not (eq? (tutcode-find-descendant-context c) pc)))
+ (tutcode-update-preedit pc))))
((tutcode-state-kigou)
(tutcode-proc-state-kigou pc key key-state)
(tutcode-update-preedit pc))