branch: externals/window-commander commit 082e03382e53ce83357520321cc6fcd47793223b Author: Daniel Semyonov <cm...@dsemy.com> Commit: Daniel Semyonov <cm...@dsemy.com>
* swsw.el (swsw-select): Ensure 'swsw-after-select-hook' runs. --- swsw.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/swsw.el b/swsw.el index a061d60985..b60604e3c7 100644 --- a/swsw.el +++ b/swsw.el @@ -218,12 +218,13 @@ If set to `lighter', use the mode line lighter of `swsw-mode'" ;; If there are less than 3 windows, don't get an ID. (interactive (unless (< (length swsw-window-list) 3) (run-hooks 'swsw-before-select-hook) - (swsw--read-id (swsw--get-id-length)))) + (unwind-protect + (swsw--read-id (swsw--get-id-length)) + (run-hooks 'swsw-after-select-hook)))) (if id (let ((window (cdr (assoc id swsw-window-list)))) (when window - (select-window window) - (run-hooks 'swsw-after-select-hook))) + (select-window window))) (other-window 1))) ;;;; Display functions: