Hiroyuki Komatsu
komat****@users*****
2005年 3月 8日 (火) 16:03:41 JST
Index: prime/uim/ChangeLog diff -u prime/uim/ChangeLog:1.2 prime/uim/ChangeLog:1.3 --- prime/uim/ChangeLog:1.2 Fri Dec 31 15:27:51 2004 +++ prime/uim/ChangeLog Tue Mar 8 16:03:41 2005 @@ -1,3 +1,12 @@ +2005-03-08 Hiroyuki Komatsu <komat****@taiya*****> + + * prime.scm: + - Fixed the bug that prime-set-candidate-index-handler does not commit + the selected candidate. + Thanks for the notice from Masaki Yatsu. + - Added a new function prime-commit-segment-nth which commits + the nth segment. + 2004-12-31 Hiroyuki Komatsu <komat****@taiya*****> * uim-prime 0.8.6: Index: prime/uim/prime.scm diff -u prime/uim/prime.scm:1.3 prime/uim/prime.scm:1.4 --- prime/uim/prime.scm:1.3 Mon Mar 7 18:31:06 2005 +++ prime/uim/prime.scm Tue Mar 8 16:03:41 2005 @@ -1619,6 +1619,11 @@ ; (prime-engine-modify-commit (prime-context-session-default context)) (prime-context-set-state! context 'prime-state-modifying))) +(define prime-commit-segment-nth + (lambda (context selection-index) + (prime-segment-selection-move context selection-index) + (prime-commit-segment context))) + (define prime-commit-candidate (lambda (context index-no) (prime-engine-conv-select (prime-context-session context) index-no) @@ -2063,11 +2068,13 @@ (define prime-set-candidate-index-handler (lambda (context selection-index) (print "prime-set-candidate-index-handler") - (if (= (prime-context-state context) 'prime-state-segment) - (prime-segment-selection-move context selection-index) - (prime-convert-selection-move context)) - (prime-update context) - )) + (if (prime-context-session context) + (begin + (if (= (prime-context-state context) 'prime-state-segment) + (prime-commit-segment-nth context selection-index) + (prime-commit-candidate context selection-index)) + (prime-update context) + )))) (prime-configure-widgets)