From 0e8f458d99955f83fccd14ee405fcf701047eeca Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Wed, 6 Sep 2023 20:33:27 +0800 Subject: [PATCH] fix(popup): add wdired hacks Previously, wdired actions will not close popup windows, which is cumbersome to use. We've already added similar hacks to dired. Now it's time to add similar hacks to wdired. --- modules/ui/popup/+hacks.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 2bcca7243..a7010ad7e 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -372,6 +372,12 @@ Ugh, such an ugly hack." (letf! ((#'switch-to-buffer-other-window #'pop-to-buffer)) (apply fn args)))) +;;;###package wdired +(progn + ;; close the popup after you're done with a wdired buffer + (advice-add #'wdired-abort-changes :after #'+popup-close-a) + (advice-add #'wdired-finish-edit :after #'+popup-close-a)) + ;;;###package wgrep (progn ;; close the popup after you're done with a wgrep buffer