diff --git a/nvim/lua/plugins/git.lua b/nvim/lua/plugins/git.lua index f0aa0b3..50e0489 100644 --- a/nvim/lua/plugins/git.lua +++ b/nvim/lua/plugins/git.lua @@ -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 '' 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 '' end end