fix(git): keep URI buffers loaded so jumplist entries stay valid

This commit is contained in:
2026-04-30 07:24:42 +02:00
parent ef9baecb73
commit 775add9b15
+1 -5
View File
@@ -175,11 +175,7 @@ function M.read_uri(buf)
vim.b[buf].git_worktree = worktree
vim.bo[buf].swapfile = false
-- `unload` frees content when the buffer is hidden, but keeps the
-- bufnr in the buffer list so the jumplist's `(bufnr, line, col)`
-- entries stay valid. `<C-o>` back to a hidden URI buffer triggers
-- the BufReadCmd again, refreshing content via `cat-file -p`.
vim.bo[buf].bufhidden = "unload"
vim.bo[buf].bufhidden = "hide"
---@type string?
local stdout = pending_content[buf]