[uim-commit] r1407 - branches/0.4/scm

ekato at freedesktop.org ekato at freedesktop.org
Sun Sep 4 00:46:03 PDT 2005


Author: ekato
Date: 2005-09-04 00:46:01 -0700 (Sun, 04 Sep 2005)
New Revision: 1407

Modified:
   branches/0.4/scm/generic.scm
Log:
* scm/generic.scm (generic-commit-by-numkey) : Port r1406 from trunk.


Modified: branches/0.4/scm/generic.scm
===================================================================
--- branches/0.4/scm/generic.scm	2005-09-04 07:45:18 UTC (rev 1406)
+++ branches/0.4/scm/generic.scm	2005-09-04 07:46:01 UTC (rev 1407)
@@ -172,6 +172,7 @@
     (let* ((rkc (generic-context-rk-context pc))
 	   (cs (rk-current-seq rkc))
 	   (n (generic-context-rk-nth pc) (cadr cs))
+	   (nr (length (cadr cs)))
 	   (cur-page (if (= generic-nr-candidate-max 0)
 			 0
 			 (quotient n generic-nr-candidate-max)))
@@ -182,9 +183,13 @@
 				 (else
 				  pageidx)))
 	   (idx (+ (* cur-page generic-nr-candidate-max) compensated-pageidx)))
-      (im-commit pc (nth idx (cadr cs)))
-      (im-deactivate-candidate-selector pc)
-      (rk-flush rkc))))
+      (if (< idx nr)
+	  (begin
+	    (im-commit pc (nth idx (cadr cs)))
+	    (im-deactivate-candidate-selector pc)
+	    (rk-flush rkc)
+	    #t)
+	  #f))))
 
 (define generic-proc-input-state-without-preedit
   (lambda (pc key state rkc)



More information about the uim-commit mailing list