diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-11-19 16:25:19 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-11-19 16:25:19 +0800 |
commit | 54559007c3918a9b08f8c11172ba54e4944416c3 (patch) | |
tree | f6c617ccb00975a063178ff4d13d3a59d3303428 /src/method | |
parent | 62d6c3727e4792ff3983e4198de94c34bba289a2 (diff) | |
download | lua-language-server-54559007c3918a9b08f8c11172ba54e4944416c3.zip |
找不到定义不要抛错
Diffstat (limited to 'src/method')
-rw-r--r-- | src/method/textDocument/definition.lua | 2 |
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) |