fix(popup,undo): show undo-tree visualizer in popup

But only if undo-tree-visualizer-diff is disabled. If it's enabled,
undo-tree has its own opinions on how to manage the two windows which
don't mesh well with our popup manager, so we leave undo-tree to its
devices.

Fix: #5617
This commit is contained in:
Henrik Lissner 2021-10-20 21:42:13 +02:00
parent e4aecd1a5a
commit db9106f92c

View file

@ -358,6 +358,15 @@ Ugh, such an ugly hack."
(funcall fn function))) (funcall fn function)))
;;;###package undo-tree
(defadvice! +popup--use-popup-window-for-undo-tree-visualizer-a (fn &rest args)
"TODO"
:around #'undo-tree-visualize
(if undo-tree-visualizer-diff
(apply fn args)
(letf! ((#'switch-to-buffer-other-window #'pop-to-buffer))
(apply fn args))))
;;;###package wgrep ;;;###package wgrep
(progn (progn
;; close the popup after you're done with a wgrep buffer ;; close the popup after you're done with a wgrep buffer