diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-03-02 18:51:42 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-03-02 18:51:42 +0800 |
commit | ad3baf56bf8e4e44491449fd87c1ad3b79746de1 (patch) | |
tree | 5622573cb0d9d4e83ab97d7a3d7b177d2ebeed9c /script/core | |
parent | c76c287ae0944080c9671a3d87697f8ea6a25caa (diff) | |
download | lua-language-server-ad3baf56bf8e4e44491449fd87c1ad3b79746de1.zip |
fixed #131
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/completion.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua index 230860c2..6b503bd5 100644 --- a/script/core/completion.lua +++ b/script/core/completion.lua @@ -111,7 +111,7 @@ local function getDetail(value) detals[#detals+1] = (' = %q'):format(literal) else local str = (' = %.16f'):format(literal) - local dot = str:find('.', 1, true) + local dot = str:find('.', 1, true) or 0 local suffix = str:find('[0]+$', dot + 2) if suffix then detals[#detals+1] = str:sub(1, suffix - 1) |