diff options
Diffstat (limited to 'server/src/parser/lines.lua')
-rw-r--r-- | server/src/parser/lines.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/server/src/parser/lines.lua b/server/src/parser/lines.lua index ddb3e0b3..95e92573 100644 --- a/server/src/parser/lines.lua +++ b/server/src/parser/lines.lua @@ -102,13 +102,11 @@ local function isCharByte(byte) end function mt:positionAsChar(row, col, code) - local pos = self:position(row, col+1, code) + local pos = self:position(row, col, code) if isCharByte(self.buf:byte(pos, pos)) then return pos elseif isCharByte(self.buf:byte(pos+1, pos+1)) then return pos + 1 - elseif isCharByte(self.buf:byte(pos-1, pos-1)) then - return pos - 1 end return pos end |