summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-31 11:11:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-31 11:11:59 +0800
commitbf8399c9057927d6746b47915a7b79c62d1082bd (patch)
tree08b6258daddc8307e98308128e404d4b9b29bb33 /server/src/method/textDocument
parent0245eb9245d7ff8509822f5b505d542b925b6c7e (diff)
downloadlua-language-server-bf8399c9057927d6746b47915a7b79c62d1082bd.zip
更新语法检查
Diffstat (limited to 'server/src/method/textDocument')
-rw-r--r--server/src/method/textDocument/publishDiagnostics.lua7
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