From 93c9b6500a53c627ebb69e44ca2e95585492f069 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Thu, 7 May 2026 23:17:49 +0200 Subject: [PATCH] refactor(git/log): use bufhidden=delete for log buffers --- lua/git/log_view.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lua/git/log_view.lua b/lua/git/log_view.lua index a3d6a62..322fa9d 100644 --- a/lua/git/log_view.lua +++ b/lua/git/log_view.lua @@ -13,9 +13,8 @@ local cr = vim.api.nvim_replace_termcodes("", true, false, true) local function attach_dispatch(buf) vim.keymap.set("n", "", 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