Revision: 6564
Author: ek.kato
Date: Thu Jul 22 21:46:12 2010
Log: * scm/rk.scm (rk-proc-tail) : Properly merge two sequences.

http://code.google.com/p/uim/source/detail?r=6564

Modified:
 /trunk/scm/rk.scm

=======================================
--- /trunk/scm/rk.scm   Thu Jun 10 19:29:33 2010
+++ /trunk/scm/rk.scm   Thu Jul 22 21:46:12 2010
@@ -253,15 +253,17 @@
       (if old-seq
         (begin
           (rk-flush context)
-          ;; Comment out the code using rk-merge-seqs for the
-          ;; moment because of rk-backspace problem -- ekato
-          ;;(set! res
-          ;;    (rk-merge-seqs
-          ;;     (cadr old-seq)
-          ;;     (rk-push-key! context (car seq)))))
-          ;;
-          (rk-push-key! context (car seq))
-          (set! res (cadr old-seq)))
+          (let ((new-res (rk-push-key! context (car seq)))
+                (old (cadr old-seq)))
+            (if new-res
+              (let ((newlst (if (list? (car new-res))
+                              new-res
+                              (list new-res)))
+                    (oldlst (if (list? (car old))
+                              old
+                              (list old))))
+                (set! res (append oldlst newlst)))
+              (set! res old))))
         ;;
         (if (not (null? (rk-context-seq context)))
           (begin

Reply via email to