fix(merge): notify on navigation wrap-around

Problem: goto_next and goto_prev in the merge module wrapped silently
when reaching the last or first unresolved hunk.

Solution: add vim.notify before the wrap-around jump in both functions.
This commit is contained in:
Barrett Ruth 2026-02-09 13:54:03 -05:00
parent 946724096f
commit 910be50201
2 changed files with 78 additions and 0 deletions

View file

@ -298,6 +298,7 @@ function M.goto_next(bufnr)
end
end
vim.notify('[diffs.nvim]: wrapped to first hunk', vim.log.levels.INFO)
vim.api.nvim_win_set_cursor(0, { candidates[1].start_line + 1, 0 })
end
@ -335,6 +336,7 @@ function M.goto_prev(bufnr)
end
end
vim.notify('[diffs.nvim]: wrapped to last hunk', vim.log.levels.INFO)
vim.api.nvim_win_set_cursor(0, { candidates[#candidates].start_line + 1, 0 })
end