summaryrefslogtreecommitdiff
path: root/src/method/textDocument/definition.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-11-19 16:25:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-11-19 16:25:19 +0800
commit54559007c3918a9b08f8c11172ba54e4944416c3 (patch)
treef6c617ccb00975a063178ff4d13d3a59d3303428 /src/method/textDocument/definition.lua
parent62d6c3727e4792ff3983e4198de94c34bba289a2 (diff)
downloadlua-language-server-54559007c3918a9b08f8c11172ba54e4944416c3.zip
找不到定义不要抛错
Diffstat (limited to 'src/method/textDocument/definition.lua')
-rw-r--r--src/method/textDocument/definition.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/method/textDocument/definition.lua b/src/method/textDocument/definition.lua
index 392696d1..d9378b58 100644
--- a/src/method/textDocument/definition.lua
+++ b/src/method/textDocument/definition.lua
@@ -11,7 +11,7 @@ return function (lsp, params)
local pos = parser.calcline.position(text, params.position.line + 1, params.position.character + 1)
local suc, start, finish = matcher.definition(text, pos)
if not suc then
- return nil, start
+ return {}
end
local start_row, start_col = parser.calcline.rowcol(text, start)