Skip to content

Commit

Permalink
fix: don't show preview if there are no changes (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevearc committed Jan 7, 2023
1 parent 6a227e9 commit 6d0b6ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/oil/mutator/preview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6d0b6ac

Please sign in to comment.