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:
parent
946724096f
commit
910be50201
2 changed files with 78 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue