fix(conflict): notify on navigation wrap-around
Problem: goto_next and goto_prev wrapped silently when reaching the last or first conflict, giving no indication to the user. Solution: add vim.notify before the wrap-around jump in both functions.
This commit is contained in:
parent
603c966c71
commit
946724096f
2 changed files with 56 additions and 0 deletions
|
|
@ -323,6 +323,7 @@ function M.goto_next(bufnr)
|
|||
return
|
||||
end
|
||||
end
|
||||
vim.notify('[diffs.nvim]: wrapped to first conflict', vim.log.levels.INFO)
|
||||
vim.api.nvim_win_set_cursor(0, { regions[1].marker_ours + 1, 0 })
|
||||
end
|
||||
|
||||
|
|
@ -340,6 +341,7 @@ function M.goto_prev(bufnr)
|
|||
return
|
||||
end
|
||||
end
|
||||
vim.notify('[diffs.nvim]: wrapped to last conflict', vim.log.levels.INFO)
|
||||
vim.api.nvim_win_set_cursor(0, { regions[#regions].marker_ours + 1, 0 })
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue