summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-21 18:08:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-21 18:08:13 +0800
commit0d56d8653a28f12601deba8b1a137557cf42f6cd (patch)
treefdbf5409164326e3a8359b171a455db7230dfd10 /server/src
parent8683ecd814c99ee6aa4fe028798a007cb96bcdad (diff)
downloadlua-language-server-0d56d8653a28f12601deba8b1a137557cf42f6cd.zip
修正跳过可选参数没有立即关闭参数提示的问题
Diffstat (limited to 'server/src')
-rw-r--r--server/src/matcher/signature.lua2
-rw-r--r--server/src/parser/grammar.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/src/matcher/signature.lua b/server/src/matcher/signature.lua
index c62117fc..413e305c 100644
--- a/server/src/matcher/signature.lua
+++ b/server/src/matcher/signature.lua
@@ -1,7 +1,7 @@
local hover = require 'matcher.hover'
local function isContainPos(obj, pos)
- if obj.start <= pos and obj.finish + 1 >= pos then
+ if obj.start <= pos and obj.finish >= pos then
return true
end
return false
diff --git a/server/src/parser/grammar.lua b/server/src/parser/grammar.lua
index 942c23fc..32be697b 100644
--- a/server/src/parser/grammar.lua
+++ b/server/src/parser/grammar.lua
@@ -268,7 +268,7 @@ Suffix <- DOT MustName
/ Sp ({} Table {}) -> Call
/ Sp ({} String {}) -> Call
/ BL Exp -> Index BR
- / Sp ({} PL ExpList PR? {}) -> Call
+ / Sp ({} PL ExpList (PR / Sp) {}) -> Call
DirtyExp <- Exp / DirtyName
ExpList <- (COMMA DirtyExp)+