aggressive-indent-mode icon indicating copy to clipboard operation
aggressive-indent-mode copied to clipboard

Protecting `anzu-query-replace` and `anzu-query-replace-regexp`

Open okamsn opened this issue 3 years ago • 3 comments

Anzu is a package to preview replacements in the buffer before finalizing the input. It breaks if Aggressive Indent moves text while the replacement is running. It seems that because of how Anzu reads text from the minibuffer, Agressive Indent sees this-command as exit-minibuffer instead of anzu-query-replace.

Adding exit-minibuffer to aggressive-indent-protected-current-commands seems to correctly prevent indentation so that Anzu can correctly replace the text, but I don't know whether that would break anything else.

okamsn avatar Aug 15 '22 23:08 okamsn

Adding exit-minibuffer seems safe enough. At most, it'll make the package a little bit less aggressive. Care to make a PR?

Malabarba avatar Aug 15 '22 23:08 Malabarba

Done in #156.

okamsn avatar Aug 15 '22 23:08 okamsn

Thanks! Let's see if it works.

Malabarba avatar Aug 17 '22 00:08 Malabarba