summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-28 15:32:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-28 15:32:50 +0800
commit266b1d1bae0f45fac30a493e219cb4a5ea779068 (patch)
tree227fdf72691553df903a8371eac0971cae65198b /server
parentf9d9266198cb54cadb7e75815a39bf2ce29ff045 (diff)
downloadlua-language-server-266b1d1bae0f45fac30a493e219cb4a5ea779068.zip
改下排序
Diffstat (limited to 'server')
-rw-r--r--server/src/method/textDocument/codeAction.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/method/textDocument/codeAction.lua b/server/src/method/textDocument/codeAction.lua
index 6dc664dc..80faee51 100644
--- a/server/src/method/textDocument/codeAction.lua
+++ b/server/src/method/textDocument/codeAction.lua
@@ -99,8 +99,8 @@ local function solveAmbiguity1(lsp, uri, data, callback)
end
local function solveDiagnostic(lsp, uri, data, callback)
- if data.code then
- disableDiagnostic(lsp, uri, data, callback)
+ if not data.code then
+ return
end
if data.code == 'undefined-global' then
solveUndefinedGlobal(lsp, uri, data, callback)
@@ -114,6 +114,7 @@ local function solveDiagnostic(lsp, uri, data, callback)
if data.code == 'ambiguity-1' then
solveAmbiguity1(lsp, uri, data, callback)
end
+ disableDiagnostic(lsp, uri, data, callback)
end
return function (lsp, params)