summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-04-07 16:34:56 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-04-07 16:34:56 +0800
commit65cc77a8f6dfe7bfaac51cc6245f0de9efbac72a (patch)
tree64a1cc91ddc3be4147a03dce3b92f3d9ec648295
parentd0eee5555d407d4ef4b3fac5cc6be9789ff0d77a (diff)
downloadlua-language-server-65cc77a8f6dfe7bfaac51cc6245f0de9efbac72a.zip
fix #497
-rw-r--r--changelog.md3
-rw-r--r--script/provider/provider.lua2
2 files changed, 4 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 25783792..5622f6c9 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,8 @@
# changelog
+## 1.20.4
+`FIX` [#497](https://github.com/sumneko/lua-language-server/issues/497)
+
## 1.20.3
`2021-4-6`
`FIX` [#479](https://github.com/sumneko/lua-language-server/issues/479)
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 11b87405..65993940 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -458,7 +458,7 @@ proto.on('textDocument/completion', function (params)
if not files.exists(uri) then
return nil
end
- if config.other.acceptSuggestionOnEnter ~= 'off' then
+ if params.context and config.other.acceptSuggestionOnEnter ~= 'off' then
if params.context.triggerCharacter == '\n'
or params.context.triggerCharacter == '{'
or params.context.triggerCharacter == ',' then