function maybe_set_intvar (vari, n)
{
- var term = new IntTerm (n);
+ var term = new Xex.IntTerm (n);
if (vari)
vari.SetValue (term);
return term;
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;
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)
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;