Can't advise vr--perform-query-replace
When I use vr/query-replace I would like the current replace candidate to always be centered on my screen. With the plain old query-replace I can get the desired behavior with following code:
(add-hook 'replace-update-post-hook #'recenter)
I could not find and similar hook for the visual-regexp package. I looked at the source code of the plain query-replace function and found that the replace-update-post-hook is called after perform-replace.
I then saw that vr/query-replace uses a similar function called vr--perform-query-replace, so I thought I could get the desired behavior with the following advice:
(advice-add 'vr--perform-query-replace :after #'recenter)
Unfortunately this advise has no effect.
How can I get similar behavior to replace-update-post-hook?
I also want to know.