From 24243540681b97956ef29a6bec9d94a6f1dc5208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 30 Nov 2018 15:14:36 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/method/textDocument/definition.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/src/method/textDocument') diff --git a/server/src/method/textDocument/definition.lua b/server/src/method/textDocument/definition.lua index 10f11f91..f6557061 100644 --- a/server/src/method/textDocument/definition.lua +++ b/server/src/method/textDocument/definition.lua @@ -9,8 +9,8 @@ return function (lsp, params) return nil, '找不到文件:' .. uri end -- lua是从1开始的,因此都要+1 - local position = lines:position(params.position.line + 1, params.position.character + 1) - local suc, results = matcher.definition(ast, position, 'utf8') + local position = lines:position(params.position.line + 1, params.position.character + 1, 'utf8') + local suc, results = matcher.definition(ast, position) if not suc then return {} end -- cgit v1.2.3