fix(bufkill): wait for user's input (#3535)

This commit is contained in:
LostNeophyte 2022-11-27 14:18:49 +01:00 committed by GitHub
parent 731a3915e1
commit 1fbcaf81dc
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

@ -194,9 +194,9 @@ function M.buf_kill(kill_command, bufnr, force)
vim.ui.input({
prompt = string.format([[%s. Close it anyway? [y]es or [n]o (default: no): ]], warning),
}, function(choice)
if choice ~= nil and choice:match "ye?s?" then force = true end
if choice ~= nil and choice:match "ye?s?" then M.buf_kill(kill_command, bufnr, true) end
end)
if not force then return end
return
end
end