refactor(git/log): use bufhidden=delete for log buffers

This commit is contained in:
2026-05-07 23:17:49 +02:00
parent 4677da16cc
commit 93c9b6500a
+3 -4
View File
@@ -13,9 +13,8 @@ local cr = vim.api.nvim_replace_termcodes("<CR>", true, false, true)
local function attach_dispatch(buf)
vim.keymap.set("n", "<CR>", function()
local r = repo.resolve(buf)
-- Anchor past the leading graph chars (matches the leading sha
-- column, not any hex word that happens to appear later in the
-- subject).
-- Anchor past the leading graph chars (matches the leading sha column,
-- not any hex word that happens to appear later in the subject).
local sha = r
and vim.api
.nvim_get_current_line()
@@ -99,7 +98,7 @@ function M.read_uri(buf)
repo.bind(buf, r)
vim.bo[buf].swapfile = false
vim.bo[buf].bufhidden = "hide"
vim.bo[buf].bufhidden = "delete"
vim.bo[buf].buftype = "nofile"
vim.bo[buf].modifiable = false
if vim.bo[buf].filetype ~= "gitlog" then