From 892f85f606d166960b66a8aba2e36215d648b311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 22 Feb 2021 14:18:54 +0800 Subject: fix signature param index misplaced --- changelog.md | 1 + script/provider/provider.lua | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 9f73473c..9d2ee696 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ # changelog ## 1.16.1 +* `FIX` signature: parameters may be misplaced * `FIX` runtime errors ## 1.16.0 diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 04d1b4e6..3fe7e691 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -564,7 +564,7 @@ proto.on('textDocument/signatureHelp', function (params) end await.close('signatureHelp') await.setID('signatureHelp') - local offset = files.offsetOfWord(uri, params.position) + local offset = files.offset(uri, params.position) local core = require 'core.signature' local results = core(uri, offset - 1) if not results then -- cgit v1.2.3