Skip to content

Commit

Permalink
Do not keep layout for NeogitCommitMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
Shatur committed Oct 25, 2023
1 parent e6b9137 commit fd5820e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugin/buffers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ local function close_buffer(command)
end

-- Never kill toggleterm
if vim.api.nvim_buf_get_option(buffer, 'filetype') == 'toggleterm' then
local filettype = vim.api.nvim_buf_get_option(buffer, 'filetype')
if filettype == 'toggleterm' then
toggleterm.toggle(1)
return
end

if vim.api.nvim_buf_get_option(buffer, 'buftype'):len() ~= 0 or stickybuf.should_auto_pin(buffer) then
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)
Expand Down

0 comments on commit fd5820e

Please sign in to comment.