diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-02-22 14:40:22 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-02-22 14:40:22 +0800 |
commit | 2e57e65b6fa218d9de47473628940f8d2db43f79 (patch) | |
tree | 9629a1cec1de6c025c2bf5eb9b1b086dd72d5e6f /script/core | |
parent | 892f85f606d166960b66a8aba2e36215d648b311 (diff) | |
download | lua-language-server-2e57e65b6fa218d9de47473628940f8d2db43f79.zip |
#400 fix signature behind `}`
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/signature.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/script/core/signature.lua b/script/core/signature.lua index 6e3d7e11..ab6d133a 100644 --- a/script/core/signature.lua +++ b/script/core/signature.lua @@ -11,11 +11,16 @@ local function findNearCall(uri, ast, pos) if src.type == 'call' or src.type == 'table' or src.type == 'function' then - -- call()$ + -- call(),$ if src.finish <= pos and text:sub(src.finish, src.finish) == ')' then return end + -- {},$ + if src.finish <= pos + and text:sub(src.finish, src.finish) == '}' then + return + end if not nearCall or nearCall.start < src.start then nearCall = src end |