Skip to content

Commit

Permalink
Rework buffer close
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed May 22, 2024
1 parent 1ca7e4c commit 24c38ca
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions plugin/buffers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,9 @@ local function close_buffer(command)
return
end

--
if vim.api.nvim_buf_get_option(buffer, 'buftype'):len() ~= 0 or stickybuf.should_auto_pin(buffer) or filettype == 'NeogitCommitMessage' then
local winid = vim.fn.bufwinid(buffer)
if stickybuf.is_pinned(winid) then
stickybuf.unpin(winid)
end
vim.api.nvim_buf_delete(buffer, { force = bang })
vim.cmd.quit()
return
end

Expand Down

0 comments on commit 24c38ca

Please sign in to comment.