From: handa Date: Sat, 27 Feb 2010 02:37:15 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: ALPHA~41 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=52542d452e3b5a12560ad6597838f8aa1148fd16;p=m17n%2Fm17n-lib-js.git *** empty log message *** --- diff --git a/xex.js b/xex.js index 564a943..f3d5088 100644 --- a/xex.js +++ b/xex.js @@ -1504,7 +1504,7 @@ var MIM = { 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); } @@ -1515,7 +1515,7 @@ var MIM = { } MIM.SurroundMarker.prototype.CharAt = function (ic) { - if (this.name == '@-0') + if (this.val == '@-0') return -1; var p = this.Position (ic); if (p < 0) @@ -2504,7 +2504,8 @@ MIM.im_domain.DefType (MIM.State.prototype); 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);