MIM.SurroundMarker = function (name)
{
this.val = name;
- this.distance = parseInt (name.slice (2));
+ this.distance = parseInt (name.slice (1));
if (isNaN (this.distance))
throw new Xex.ErrTerm (MIM.Error.ParseError, "Invalid marker: " + name);
}
}
MIM.SurroundMarker.prototype.CharAt = function (ic)
{
- if (this.name == '@-0')
+ if (this.val == '@-0')
return -1;
var p = this.Position (ic);
if (p < 0)
GetSurroundingChar: function (pos)
{
- pos += this.caret_pos;
+ pos += this.spot;
+ Xex.Log (0, 'getting char at ' + pos);
if (pos < 0 || pos >= this.target.value.length)
return 0;
return this.target.value.charCodeAt (pos);