summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
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