From b282570c18ccc55e26b9407f5e4d298d5dbc966b Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Thu, 27 Jun 2024 23:31:29 +0300 Subject: [PATCH] fix(bufremove): fix `Cancel` --- lua/lazyvim/util/ui.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lazyvim/util/ui.lua b/lua/lazyvim/util/ui.lua index 6bb8a4f7..28537bce 100644 --- a/lua/lazyvim/util/ui.lua +++ b/lua/lazyvim/util/ui.lua @@ -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 / and 3 for Cancel return end if choice == 1 then -- Yes