diff --git a/lua/tabnine/completion.lua b/lua/tabnine/completion.lua index 6b8f7a1..dda4117 100644 --- a/lua/tabnine/completion.lua +++ b/lua/tabnine/completion.lua @@ -14,6 +14,9 @@ end function M.accept() M.clear() + if not state.rendered_completion then + return + end local lines = utils.str_to_lines(state.rendered_completion) if utils.starts_with(state.rendered_completion, "\n") then