summaryrefslogtreecommitdiff
path: root/script
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 /script
parentd0eee5555d407d4ef4b3fac5cc6be9789ff0d77a (diff)
downloadlua-language-server-65cc77a8f6dfe7bfaac51cc6245f0de9efbac72a.zip
fix #497
Diffstat (limited to 'script')
-rw-r--r--script/provider/provider.lua2
1 files changed, 1 insertions, 1 deletions
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