visual-regexp.el icon indicating copy to clipboard operation
visual-regexp.el copied to clipboard

Respect multiple frames (incl. mini frames) when finding the window displaying the target buffer

Open MattMicheletti opened this issue 4 years ago • 1 comments

For the function vr--target-window, its call to get-buffer-window should use the second argument to respect multi frame Emacs configurations as well for packages like maple-minibuffer. Otherwise visual-regexp will throw an error when called and sort of break (replacing still works but the UI of visual-regexp kind of goes haywire as overlays stick around, etc.).

Recommend replacement (incl. changing the if with when for better readability):

(defun vr--target-window ()
  (when vr--target-buffer
      (get-buffer-window vr--target-buffer 'visible)))

Thoughts?

Thanks for a great package BTW! :)

MattMicheletti avatar Dec 07 '21 19:12 MattMicheletti

Can you provide a step by step instruction on how to produce the bug/break?

Can you make a PR?

benma avatar Dec 20 '21 10:12 benma