From aaea8466dae6cbade0be545562ab6679dbcbc9e2 Mon Sep 17 00:00:00 2001 From: Georgi Dimitrov Date: Tue, 10 Dec 2024 16:54:52 +0200 Subject: [PATCH] neovim: fix gitsigns next/prev funcs --- nvim/lua/plugins/git.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nvim/lua/plugins/git.lua b/nvim/lua/plugins/git.lua index f0aa0b3..8c34d22 100644 --- a/nvim/lua/plugins/git.lua +++ b/nvim/lua/plugins/git.lua @@ -33,14 +33,18 @@ return { if vim.wo.diff then vim.cmd.normal({ ']c', bang = true }) else - gitsigns.nav_hunk('next') + vim.schedule(function() + gitsigns.nav_hunk('next') + end) end end local function prev_hunk() if vim.wo.diff then vim.cmd.normal({ '[c', bang = true }) else - gitsigns.nav_hunk('prev') + vim.schedule(function() + gitsigns.nav_hunk('prev') + end) end end