summaryrefslogtreecommitdiff
path: root/script-beta/core/completion.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-16 10:43:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-16 10:43:13 +0800
commit407cd575e66b7f3aa7b0624f7dccaef81ba48658 (patch)
tree4d38efcb7061824c94b825e7f7c59acb5668fddf /script-beta/core/completion.lua
parent957d162f4e7e84950530d9541c269433525c2c3e (diff)
downloadlua-language-server-407cd575e66b7f3aa7b0624f7dccaef81ba48658.zip
修正#t+1有时不会添加 = 的bug
Diffstat (limited to 'script-beta/core/completion.lua')
-rw-r--r--script-beta/core/completion.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua
index 7c2f8628..a3fbae0b 100644
--- a/script-beta/core/completion.lua
+++ b/script-beta/core/completion.lua
@@ -582,7 +582,7 @@ local function checkLenPlusOne(ast, text, offset, results)
if source.parent == guide.getParentBlock(source) then
-- state
local label = text:match('%#[ \t]*', pos) .. nodeText .. '+1'
- local eq = text:find('%s*%=', source.node.finish)
+ local eq = text:find('^%s*%=', source.node.finish)
local newText = label .. ']'
if not eq then
newText = newText .. ' = '