You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following functions to set a mark when entering insert mode and when leaving insert mode read that mark, count lines and perform a change on the lines
-- required to add the mark on entering insert mode
-- for M.perform_change_on_insert_mode to work properly
function M.set_mark_for_insert_leave_event()
vim.api.nvim_command("normal! mm")
end
function M.perform_change_on_insert_mode()
local start_line = vim.fn.getpos("'m")[2]
local end_line = vim.api.nvim_win_get_cursor(0)[1]
...
end
the problem is:
copilot appears to leave insert mode in a strange way: if I set a print on start_line and end_line, after I accept a suggestion, the start line will be set at 0 and end line at the line it is supposed to be, which is fine, the problem appears to be the start line really.
this behavior may mess up insertLeave event hooks.
I was wondering if there is a special reason it must be this way.
I have the following functions to set a mark when entering insert mode and when leaving insert mode read that mark, count lines and perform a change on the lines
the problem is:
copilot appears to leave insert mode in a strange way: if I set a print on start_line and end_line, after I accept a suggestion, the start line will be set at 0 and end line at the line it is supposed to be, which is fine, the problem appears to be the start line really.
this behavior may mess up insertLeave event hooks.
I was wondering if there is a special reason it must be this way.
my config: (in case there is some problem here)
The text was updated successfully, but these errors were encountered: