fix: don't show preview if there are no changes (#19)

This commit is contained in:
Steven Arcangeli 2023-01-06 18:25:48 -08:00
parent 6a227e932f
commit 6d0b6ac43c

View file

@ -44,7 +44,7 @@ end
---@param should_confirm nil|boolean
---@param cb fun(proceed: boolean)
M.show = vim.schedule_wrap(function(actions, should_confirm, cb)
if should_confirm == false then
if should_confirm == false or #actions == 0 then
cb(true)
return
end