summaryrefslogtreecommitdiff
path: root/server/test/crossfile
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-21 18:17:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-21 18:17:55 +0800
commit486ad493425397295e38ae19de9ba7051696d61b (patch)
tree13b1f87b9ca0ce7fc113da8c56bd49aef40dec96 /server/test/crossfile
parent92f5b7b301473cad98a28cb2a34440a09ca99cd7 (diff)
downloadlua-language-server-486ad493425397295e38ae19de9ba7051696d61b.zip
修正下划线阻断自动完成的BUG
Diffstat (limited to 'server/test/crossfile')
-rw-r--r--server/test/crossfile/completion.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/test/crossfile/completion.lua b/server/test/crossfile/completion.lua
index 6039d1ef..61908dbd 100644
--- a/server/test/crossfile/completion.lua
+++ b/server/test/crossfile/completion.lua
@@ -78,12 +78,12 @@ local function findWord(position, text)
local word = text
for i = position-1, 1, -1 do
local c = text:sub(i, i)
- if not c:find '%w' then
+ if not c:find '[%w_]' then
word = text:sub(i+1, position)
break
end
end
- return word:match('^(%w*)')
+ return word:match('^([%w_]*)')
end
function TEST(data)