fix: copilot indent reset (#3343) (#3960)

This commit is contained in:
Khilseith 2023-03-20 04:54:41 +00:00 committed by GitHub
parent f64294f768
commit 57395bcc8a
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4AEE18F83AFDEB23

View file

@ -331,6 +331,12 @@ M.config = function()
if is_insert_mode() then -- prevent overwriting brackets
confirm_opts.behavior = ConfirmBehavior.Insert
end
local entry = cmp.get_selected_entry()
local is_copilot = entry and entry.source.name == "copilot"
if is_copilot then
confirm_opts.behavior = ConfirmBehavior.Replace
confirm_opts.select = true
end
if cmp.confirm(confirm_opts) then
return -- success, exit early
end