fix(bufremove): fix Cancel

This commit is contained in:
Iordanis Petkakis 2024-06-27 23:31:29 +03:00
parent ff1b44e676
commit b282570c18

View file

@ -231,7 +231,7 @@ function M.bufremove(buf)
if vim.bo.modified then
local choice = vim.fn.confirm(("Save changes to %q?"):format(vim.fn.bufname()), "&Yes\n&No\n&Cancel")
if choice == 0 then -- Cancel
if choice == 0 or choice == 3 then -- 0 for <Esc>/<C-c> and 3 for Cancel
return
end
if choice == 1 then -- Yes