From ac38d7860b258ec07085d8d1931e1a487bcee21d Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Mon, 20 Jan 2025 15:22:48 +0000 Subject: [PATCH] fix: GitSignsChanged autocmd for staged hunks Fixes #1168 --- lua/gitsigns/async.lua | 9 --------- lua/gitsigns/git.lua | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/lua/gitsigns/async.lua b/lua/gitsigns/async.lua index 34f829e52..ecde41626 100644 --- a/lua/gitsigns/async.lua +++ b/lua/gitsigns/async.lua @@ -203,13 +203,4 @@ function M.run(func, ...) return run(func, nil, ...) end ---- @param func fun() ---- @return boolean stat ---- @return string? err -function M.pcall(func) - return M.await(1, function(cb) - run(func, cb) - end) -end - return M diff --git a/lua/gitsigns/git.lua b/lua/gitsigns/git.lua index e3cd7ade8..5f33ee596 100644 --- a/lua/gitsigns/git.lua +++ b/lua/gitsigns/git.lua @@ -352,7 +352,7 @@ function Obj:stage_hunks(hunks, invert) end end - local stat, err = async.pcall(function() + local stat, err = pcall(function() self.repo:command({ 'apply', '--whitespace=nowarn',