Skip to content

Commit

Permalink
fix: disable for Neogit commit message (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanueltouzery authored Oct 24, 2023
1 parent ae746b9 commit f3398f8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/stickybuf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,12 @@ M.should_auto_pin = function(bufnr)
elseif filetype == "fern" and (vim.wo.winfixwidth or vim.wo.winfixheight) then
-- Only pin fern if it was opened as a split (has fixed height/width)
return "filetype"
elseif vim.startswith(filetype, "Neogit") then
elseif
vim.startswith(filetype, "Neogit")
-- NeogitCommitMessage relies on BufUnload, can't apply to it
-- https://github.com/NeogitOrg/neogit/blob/51a6e6c8952b361300be57b36c8e1b973880cdd7/lua/neogit/buffers/commit_editor/init.lua#L43
and filetype ~= "NeogitCommitMessage"
then
if vim.fn.winnr("$") > 1 then
return "filetype"
end
Expand Down

0 comments on commit f3398f8

Please sign in to comment.