diff options
author | Dev <[email protected]> | 2022-11-18 02:28:02 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2022-11-18 09:28:02 +0100 |
commit | a8957a9d363650aba87392b4a144617d08ca96f7 (patch) | |
tree | f6ec18629d2b6317341e703d7a16945e6eae8301 /lua/lvim/core/bufferline.lua | |
parent | b42e8c3c73751837237166c1e726443d96628d78 (diff) |
fix: discard invalid choice when closing buffers (#3488)
Diffstat (limited to 'lua/lvim/core/bufferline.lua')
-rw-r--r-- | lua/lvim/core/bufferline.lua | 2 |
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 |