Skip to content

Commit 30321e3

Browse files
authored
fix(suggestion): Trigger suggestion on InsertEnter (zbirenbaum#318)
1 parent 886ee73 commit 30321e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/copilot/suggestion.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ local function trigger(bufnr, timer)
324324
local _timer = copilot._copilot_timer
325325
copilot._copilot_timer = nil
326326

327-
if bufnr ~= vim.api.nvim_get_current_buf() or timer ~= _timer or vim.fn.mode() ~= "i" then
327+
if bufnr ~= vim.api.nvim_get_current_buf() or (_timer ~= nil and timer ~= _timer) or vim.fn.mode() ~= "i" then
328328
return
329329
end
330330

0 commit comments

Comments
 (0)