Skip to content

Commit

Permalink
neovim: fix gitsigns next/prev funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
geodimm committed Dec 11, 2024
1 parent 9564a43 commit 510798b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions nvim/lua/plugins/git.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,22 @@ return {
end
local function next_hunk()
if vim.wo.diff then
vim.cmd.normal({ ']c', bang = true })
return ']c'
else
gitsigns.nav_hunk('next')
vim.schedule(function()
gitsigns.nav_hunk('next')
end)
return '<Ignore>'
end
end
local function prev_hunk()
if vim.wo.diff then
vim.cmd.normal({ '[c', bang = true })
return '[c'
else
gitsigns.nav_hunk('prev')
vim.schedule(function()
gitsigns.nav_hunk('prev')
end)
return '<Ignore>'
end
end

Expand Down

0 comments on commit 510798b

Please sign in to comment.