Skip to content

Commit

Permalink
fix(blame): restore original options when blame window is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
ofseed authored and lewis6991 committed Aug 3, 2024
1 parent 0ed4669 commit 564849a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/gitsigns/blame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ M.blame = function()
vim.cmd('normal! 0')

local cur_wlo = vim.wo[win][0]
local cur_orig_wlo = { cur_wlo.foldenable, cur_wlo.scrollbind, cur_wlo.wrap }
cur_wlo.foldenable = false
cur_wlo.scrollbind = true
cur_wlo.wrap = false
Expand Down Expand Up @@ -389,6 +390,7 @@ M.blame = function()
group = group,
callback = function()
api.nvim_buf_clear_namespace(bufnr, ns, 0, -1)
cur_wlo.foldenable, cur_wlo.scrollbind, cur_wlo.wrap = unpack(cur_orig_wlo)
end,
})

Expand Down

0 comments on commit 564849a

Please sign in to comment.