Skip to content

Commit

Permalink
small fix to reporting for sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Badragan authored and MagicDuck committed May 11, 2024
1 parent 2fc7391 commit 17fed9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/grug-far/actions/syncLocations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ local function syncLocations(params)
local buf = params.buf
local context = params.context
local state = context.state
local startTime = uv.now()

local extmarks = vim.api.nvim_buf_get_extmarks(0, context.locationsNamespace, 0, -1, {})
local changedLines = {}
Expand All @@ -128,12 +129,14 @@ local function syncLocations(params)
end

if #changedLines == 0 then
state.actionMessage = 'no changes to sync!'
renderResultsHeader(buf, context)
vim.notify('grug-far: no changes to sync!', vim.log.levels.INFO)
return
end

local changesCount = 0
local changesTotal = #changedLines
local startTime = uv.now()

-- initiate sync in UI
vim.schedule(function()
Expand Down

0 comments on commit 17fed9f

Please sign in to comment.