Skip to content

Commit

Permalink
more extensive checks
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondill committed Apr 30, 2023
1 parent a524be4 commit 0e0d854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/tabnine/keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ local config = require("tabnine.config")
local completion = require("tabnine.completion")

function M.accept_suggestion()
if not state.completions_cache then
if not state.completions_cache or not state.rendered_completion then
return false
end
vim.schedule(completion.accept)
return true
end
function M.dismiss_suggestion()
if not state.completions_cache then
if not state.completions_cache or not state.rendered_completion then
return false
end
vim.schedule(function()
Expand Down

0 comments on commit 0e0d854

Please sign in to comment.