Преглед на файлове

fix: discard invalid choice when closing buffers (#3488)

Dev преди 2 години
родител
ревизия
a8957a9d36
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      lua/lvim/core/bufferline.lua

+ 1 - 1
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