summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDev <[email protected]>2022-11-18 02:28:02 -0600
committerGitHub <[email protected]>2022-11-18 09:28:02 +0100
commita8957a9d363650aba87392b4a144617d08ca96f7 (patch)
treef6ec18629d2b6317341e703d7a16945e6eae8301
parentb42e8c3c73751837237166c1e726443d96628d78 (diff)
fix: discard invalid choice when closing buffers (#3488)
-rw-r--r--lua/lvim/core/bufferline.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lvim/core/bufferline.lua b/lua/lvim/core/bufferline.lua
index a9b35cff..2bc366fc 100644
--- a/lua/lvim/core/bufferline.lua
+++ b/lua/lvim/core/bufferline.lua
@@ -194,7 +194,7 @@ 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:match "ye?s?" then force = true end
+ if choice ~= nil and choice:match "ye?s?" then force = true end
end)
if not force then return end
end