소스 검색

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

LostNeophyte 2 년 전
부모
커밋
1fbcaf81dc
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      lua/lvim/core/bufferline.lua

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