From b65c29fb4cfe14addb2e496f2917bed497f042c2 Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 2 Mar 2010 00:00:38 +0000 Subject: [PATCH] *** empty log message *** --- xex.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/xex.js b/xex.js index 1527050..38068d5 100644 --- a/xex.js +++ b/xex.js @@ -864,7 +864,7 @@ Xex.LstTerm = function (list) { this.val = list; }; function maybe_set_intvar (vari, n) { - var term = new IntTerm (n); + var term = new Xex.IntTerm (n); if (vari) vari.SetValue (term); return term; @@ -2462,6 +2462,7 @@ MIM.im_domain.DefType (MIM.State.prototype); this.state_var_values = {}; this.state_pos = 0; this.key_head = 0; + this.keys.val.length = 0; this.key_unhandled = false; this.unhandled_key = null; this.changed = MIM.ChangedStatus.None; @@ -2544,15 +2545,18 @@ MIM.im_domain.DefType (MIM.State.prototype); for (var m in this.marker_positions) { var pos = this.marker_positions[m]; - if (pos > to) + if (pos > from) { - this.marker_positions[m] = pos + diff; - Xex.Log ('Marker ' + m + ' = ' + this.marker_positions[m]); - } - else if (pos > from) - { - this.marker_positions[m] = from; - Xex.Log ('Marker ' + m + ' = ' + this.marker_positions[m]); + if (pos >= to) + { + this.marker_positions[m] = pos + diff; + Xex.Log ('Marker ' + m + ' = ' + this.marker_positions[m]); + } + else if (pos > from) + { + this.marker_positions[m] = from; + Xex.Log ('Marker ' + m + ' = ' + this.marker_positions[m]); + } } } if (this.cursor_pos >= to) @@ -2924,7 +2928,7 @@ MIM.get_range = function (target, ic) to = rr.text.length; } if (ic.range[0] == from && ic.range[1] == to - || (to == from && target.value.substring (from, to) == ic.preedit)) + && (to == from || target.value.substring (from, to) == ic.preedit)) return true; ic.range[0] = from; ic.range[1] = to; -- 1.7.10.4