Closed hotpxl closed 8 years ago
Updated description to match current status..
Update:
Seems that after switching to a new buffer, it does call ad-activate
. But I have a diff-hl
installed. It creates a background fundamental buffer to do some of its work. This buffer is created after the main buffer I'm working with. But on instantiating it ad-deactivate
is called and thus globally disabling the advice function.
My question is whether it is possible to activate/deactivate advice functions in a buffer-local fashion.
Summary:
diff-hl
(or in fact any other plugin) creates a fundamental buffer after the file is opened. evil-search-highlight-persist
sees the new buffer and disables the advice function globally.
My suggestion is to make the decision "whether to highlight" buffer local. I'll PR later.
Thank your for your patch, already merged.
Sometimes (like invoking
helm-ag
and switch to another buffer on my side), it just turns off. I did some tracing, and found out that after switching to the new buffer,turn-on-search-highlight-persist
is called (this is whatglobalized-minor-mode
do). Buthelm-ag
somehow sets the major mode tofundamental-mode
. It prevents the plugin from turning on. Then the buffer switches major mode to whatever language I'm in, but it never activates the plugin again.Is there any way I can work around this?