diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-31 11:11:59 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-31 11:11:59 +0800 |
commit | bf8399c9057927d6746b47915a7b79c62d1082bd (patch) | |
tree | 08b6258daddc8307e98308128e404d4b9b29bb33 /server/src/method/textDocument | |
parent | 0245eb9245d7ff8509822f5b505d542b925b6c7e (diff) | |
download | lua-language-server-bf8399c9057927d6746b47915a7b79c62d1082bd.zip |
更新语法检查
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r-- | server/src/method/textDocument/publishDiagnostics.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/server/src/method/textDocument/publishDiagnostics.lua b/server/src/method/textDocument/publishDiagnostics.lua index 6e2f437a..c0d86845 100644 --- a/server/src/method/textDocument/publishDiagnostics.lua +++ b/server/src/method/textDocument/publishDiagnostics.lua @@ -87,11 +87,8 @@ local function buildError(err, lines) diagnostic.severity = DiagnosticSeverity.Warning end local startrow, startcol = lines:rowcol(err.start) - local endrow, endcol - if err.finish then - endrow, endcol = lines:rowcol(err.finish) - else - endrow = startrow + local endrow, endcol = lines:rowcol(err.finish) + if err.type == 'UNKNOWN' then local _, max = lines:range(endrow) endcol = max end |