Revision: 6923
Author: deton.kih
Date: Fri Jan 21 18:12:50 2011
Log: * scm/tutcode.scm
- (tutcode-begin-interactive-bushu-conversion):
Fix division by zero error on remainder in tutcode-get-candidate-handler
when interactive bushu conversion has no candidate.
http://code.google.com/p/uim/source/detail?r=6923
Modified:
/trunk/scm/tutcode.scm
=======================================
--- /trunk/scm/tutcode.scm Sun Jan 16 01:11:10 2011
+++ /trunk/scm/tutcode.scm Fri Jan 21 18:12:50 2011
@@ -2679,11 +2679,13 @@
;; ¿·¤¿¤ÊÆþÎÏʸ»ú¤ò²Ã¤¨¤¿¹çÀ®ÉÔǽ¢ª¿·¤¿¤ÊÆþÎÏʸ»ú¤òºï½ü
((null? res)
(tutcode-context-set-head! pc (cdr (tutcode-context-head pc)))
- (tutcode-context-set-candidate-window! pc
- 'tutcode-candidate-window-interactive-bushu)
- (im-activate-candidate-selector pc
- (tutcode-context-prediction-nr-all pc)
- (tutcode-context-prediction-page-limit pc)))
+ (if (> (tutcode-context-prediction-nr pc) 0)
+ (begin
+ (tutcode-context-set-candidate-window! pc
+ 'tutcode-candidate-window-interactive-bushu)
+ (im-activate-candidate-selector pc
+ (tutcode-context-prediction-nr-all pc)
+ (tutcode-context-prediction-page-limit pc)))))
(else
(let ((nr (length res)))
(tutcode-context-set-prediction-word! pc ())