From 5f33a14eef196b2feec80f94ac26915c3fc466fc Mon Sep 17 00:00:00 2001 From: handa Date: Thu, 20 Oct 2005 12:02:04 +0000 Subject: [PATCH] Fix an argument to undo. --- zh-py.mim | 7 ++++--- zh-tonepy.mim | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/zh-py.mim b/zh-py.mim index 8a62b39..3fe018e 100644 --- a/zh-py.mim +++ b/zh-py.mim @@ -1350,8 +1350,8 @@ temporarily by typing \"Z\". ;; to init. ((input-focus-move) (shift init)) ;; When an input focus is out or in, keep the current preedit. - ((input-focus-out) (undo 1)) - ((input-focus-in) (undo 1)))) + ((input-focus-out) (set KK @@) (sub KK 1) (undo KK)) + ((input-focus-in) (set KK @@) (sub KK 1) (undo KK)))) (include (t nil cjk-util) map) @@ -1380,12 +1380,13 @@ temporarily by typing \"Z\". (nil (hide) (shift init))) (select + (t (set K @@) (sub K 1)) ;; When a number is typed, select the corresponding canidate, ;; produce it, and shift to "init" state. (focus-change) (choose (hide) (shift init)) (change-candidate) - (backspace (undo)) + (backspace (undo K)) ;; When Return is typed, fix the current preedit. (return (shift init)) ;; When anything else is typed, produce the current candidate, diff --git a/zh-tonepy.mim b/zh-tonepy.mim index 67ceec5..ce10350 100644 --- a/zh-tonepy.mim +++ b/zh-tonepy.mim @@ -2200,8 +2200,8 @@ temporarily by typing \"Z\". ;; to init. ((input-focus-move) (shift init)) ;; When an input focus is out or in, keep the current preedit. - ((input-focus-out) (undo 1)) - ((input-focus-in) (undo 1)))) + ((input-focus-out) (set KK @@) (sub KK 1) (undo KK)) + ((input-focus-in) (set KK @@) (sub KK 1) (undo KK)))) (include (t nil cjk-util) map) @@ -2230,6 +2230,7 @@ temporarily by typing \"Z\". (nil (hide) (shift init))) (select + (t (set K @@) (sub K 1)) ;; When a number is typed, select the corresponding canidate, ;; produce it, and shift to "init" state. (focus-change) -- 1.7.10.4