From 1fbcaf81dc85ae2f3c6ea108557920e1741452ad Mon Sep 17 00:00:00 2001 From: LostNeophyte Date: Sun, 27 Nov 2022 14:18:49 +0100 Subject: fix(bufkill): wait for user's input (#3535) --- lua/lvim/core/bufferline.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/lvim/core/bufferline.lua') diff --git a/lua/lvim/core/bufferline.lua b/lua/lvim/core/bufferline.lua index 2bc366fc..b6acadec 100644 --- a/lua/lvim/core/bufferline.lua +++ b/lua/lvim/core/bufferline.lua @@ -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 -- cgit v1.2.3