diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-15 20:31:33 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-15 20:31:33 +0800 |
commit | bfb7d2eb7b846888d34a24810eaf6943d618b233 (patch) | |
tree | 599a373bb8b41652f65aa7e7b64ec4462c6f0acb /script/files.lua | |
parent | 206b9ff94395708390595e73ed2b2528e7a84cad (diff) | |
download | lua-language-server-bfb7d2eb7b846888d34a24810eaf6943d618b233.zip |
fix completion at end of line
Diffstat (limited to 'script/files.lua')
-rw-r--r-- | script/files.lua | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/script/files.lua b/script/files.lua index f9023ae2..f6fa337c 100644 --- a/script/files.lua +++ b/script/files.lua @@ -721,15 +721,10 @@ function m.position(uri, offset, leftOrRight) line = row - 1, character = ucol, } - elseif col == 1 then - return { - line = row - 1, - character = 0, - } else return { - line = row, - character = 0, + line = row - 1, + character = util.utf8Len(text, start, finish), } end end |