From 52542d452e3b5a12560ad6597838f8aa1148fd16 Mon Sep 17 00:00:00 2001 From: handa Date: Sat, 27 Feb 2010 02:37:15 +0000 Subject: [PATCH] *** empty log message *** --- xex.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); -- 1.7.10.4