Author: deton.kih Date: Mon Oct 29 04:48:59 2007 New Revision: 5037
Modified: trunk/scm/tutcode.scm Log: * scm/tutcode.scm - (tutcode-key-press-handler): Fix to be able to select URL candidate at Firefox URL field. <http://arika.org/diary/20071021#p02> - (tutcode-state-has-preedit?): Add. - (tutcode-update-preedit): Remove unused variable. Modified: trunk/scm/tutcode.scm ============================================================================== --- trunk/scm/tutcode.scm (original) +++ trunk/scm/tutcode.scm Mon Oct 29 04:48:59 2007 @@ -329,8 +329,7 @@ ;;; preeditɽ�������롣 ;;; @param pc ����ƥ����ȥꥹ�� (define (tutcode-update-preedit pc) - (let ((rkc (tutcode-context-rk-context pc)) - (stat (tutcode-context-state pc))) + (let ((stat (tutcode-context-state pc))) (im-clear-preedit pc) (case stat ((tutcode-state-yomi) @@ -717,6 +716,12 @@ (not (null? lst)) (car (caar lst))))) +;;; ���ߤ�state��preedit���Ĥ��ɤ������֤��� +;;; @param pc ����ƥ����ȥꥹ�� +(define (tutcode-state-has-preedit? pc) + (memq (tutcode-context-state pc) + '(tutcode-state-yomi tutcode-state-bushu tutcode-state-converting))) + ;;; �����������줿�Ȥ��ν���ο���ʬ����Ԥ��� ;;; @param pc ����ƥ����ȥꥹ�� ;;; @param key ���Ϥ��줿���� @@ -727,16 +732,21 @@ (begin (case (tutcode-context-state pc) ((tutcode-state-on) - (tutcode-proc-state-on pc key key-state)) + (tutcode-proc-state-on pc key key-state) + (if (tutcode-state-has-preedit? pc) + ;; ���Ѵ���������Ѵ����ϡ����䢥��ɽ������ + (tutcode-update-preedit pc))) ((tutcode-state-yomi) - (tutcode-proc-state-yomi pc key key-state)) + (tutcode-proc-state-yomi pc key key-state) + (tutcode-update-preedit pc)) ((tutcode-state-converting) - (tutcode-proc-state-converting pc key key-state)) + (tutcode-proc-state-converting pc key key-state) + (tutcode-update-preedit pc)) ((tutcode-state-bushu) - (tutcode-proc-state-bushu pc key key-state)) + (tutcode-proc-state-bushu pc key key-state) + (tutcode-update-preedit pc)) (else - (tutcode-proc-state-off pc key key-state))) - (tutcode-update-preedit pc)))) + (tutcode-proc-state-off pc key key-state)))))) ;;; ������Υ���줿�Ȥ��ν����Ԥ��� ;;; @param pc ����ƥ����ȥꥹ��
