diff --git a/lua/tabnine/completion.lua b/lua/tabnine/completion.lua index 2ab0393..3a06eef 100644 --- a/lua/tabnine/completion.lua +++ b/lua/tabnine/completion.lua @@ -13,9 +13,7 @@ local function valid_response(response) end function M.accept() - if not state.completions_cache or not state.rendered_completion then - return - end + if not state.completions_cache or not state.rendered_completion then return end M.clear() local lines = utils.str_to_lines(state.rendered_completion) @@ -34,13 +32,9 @@ function M.accept() end function M.clear() - if not state.completions_cache or not state.rendered_completion then - return - end + if not state.completions_cache or not state.rendered_completion then return end - if state.cancel_completion then - state.cancel_completion() - end + if state.cancel_completion then state.cancel_completion() end state.debounce_timer:stop() api.nvim_buf_clear_namespace(0, consts.tabnine_namespace, 0, -1)