diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-27 16:18:41 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-27 16:18:41 +0800 |
commit | 36f9bc4a4cf4a1406ac01031a051888db6940a01 (patch) | |
tree | 98254eb5f90250ac8ad993f755565244d67abd0f /server/src/parser/lines.lua | |
parent | faf56c7e9d08776207c4592e6aee87a79241fdcc (diff) | |
download | lua-language-server-36f9bc4a4cf4a1406ac01031a051888db6940a01.zip |
修正自动完成有时失效的问题
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 |