[uim-commit] r1405 - trunk/scm
ekato at freedesktop.org
ekato at freedesktop.org
Sun Sep 4 17:44:25 EST 2005
Author: ekato
Date: 2005-09-04 00:44:19 -0700 (Sun, 04 Sep 2005)
New Revision: 1405
Modified:
trunk/scm/generic.scm
Log:
* scm/generic.scm (generic-commit-by-numkey) : Fix to check the
range.
Modified: trunk/scm/generic.scm
===================================================================
--- trunk/scm/generic.scm 2005-09-04 06:43:23 UTC (rev 1404)
+++ trunk/scm/generic.scm 2005-09-04 07:44:19 UTC (rev 1405)
@@ -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