fix(git): keep URI buffers loaded so jumplist entries stay valid
This commit is contained in:
+1
-5
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user