diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-11 13:28:17 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-11 13:28:17 +0800 |
commit | 7cfc2aad9ee1bc2ebaba563c8a7c8f5a4f1c64f6 (patch) | |
tree | 1d7d7e573d658ac75304b382eb09f251db76b622 /server-beta/src/core | |
parent | 57b8f00759bedec39cd22b7deeb22e59de80fabc (diff) | |
download | lua-language-server-7cfc2aad9ee1bc2ebaba563c8a7c8f5a4f1c64f6.zip |
修正几个诊断bug
Diffstat (limited to 'server-beta/src/core')
-rw-r--r-- | server-beta/src/core/diagnostics/newline-call.lua | 2 | ||||
-rw-r--r-- | server-beta/src/core/diagnostics/undefined-global.lua | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/server-beta/src/core/diagnostics/newline-call.lua b/server-beta/src/core/diagnostics/newline-call.lua index 52b84197..cb318380 100644 --- a/server-beta/src/core/diagnostics/newline-call.lua +++ b/server-beta/src/core/diagnostics/newline-call.lua @@ -21,7 +21,7 @@ return function (uri, callback) return end - local nodeRow = guide.positionOf(lines, node.start) + local nodeRow = guide.positionOf(lines, node.finish) local argRow = guide.positionOf(lines, args.start) if nodeRow == argRow then return diff --git a/server-beta/src/core/diagnostics/undefined-global.lua b/server-beta/src/core/diagnostics/undefined-global.lua index 921ba086..c3fbccbf 100644 --- a/server-beta/src/core/diagnostics/undefined-global.lua +++ b/server-beta/src/core/diagnostics/undefined-global.lua @@ -43,15 +43,13 @@ return function (uri, callback) end end globalCache[key] = false - local message + local message = lang.script('DIAG_UNDEF_GLOBAL', skey) local otherVersion = library.other[skey] local customVersion = library.custom[skey] if otherVersion then message = ('%s(%s)'):format(message, lang.script('DIAG_DEFINED_VERSION', table.concat(otherVersion, '/'), config.config.runtime.version)) elseif customVersion then message = ('%s(%s)'):format(message, lang.script('DIAG_DEFINED_CUSTOM', table.concat(customVersion, '/'))) - else - message = lang.script('DIAG_UNDEF_GLOBAL', skey) end for _, info in ipairs(infos) do callback { |