Skip to content

Commit

Permalink
fix: dont save the session when only gitcommit buffers are present. F…
Browse files Browse the repository at this point in the history
…ixes #14
  • Loading branch information
folke committed Oct 13, 2023
1 parent 21f55da commit 8f7cbcc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/persistence/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ function M.start()
if vim.bo[b].buftype ~= "" then
return false
end
if vim.bo[b].filetype == "gitcommit" then
return false
end
return vim.api.nvim_buf_get_name(b) ~= ""
end, vim.api.nvim_list_bufs())
if #bufs == 0 then
Expand Down

0 comments on commit 8f7cbcc

Please sign in to comment.