From 20cdba39a8207d170640853a9c1a2bacc9b368df Mon Sep 17 00:00:00 2001 From: Colin Woodbury Date: Mon, 11 Sep 2023 10:03:02 +0900 Subject: [PATCH] fix(evil): more reliable window detection At some point `windmove-find-other-window` stopped loading reliably, such that `SPC w H` would complain of a missing symbol. Indeed navigating to the implementation of `windmove` within Emacs's Lisp we find warnings that it has mostly been superceded by newer window APIs since 2013, and is implemented in terms of `window-in-direction`. By using `window-in-direction` directly, the loading problem disappears. --- modules/editor/evil/autoload/evil.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index 9527c1994..0f602752e 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -48,7 +48,7 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')." (user-error "Cannot swap a dedicated window")) (let* ((this-window (selected-window)) (this-buffer (current-buffer)) - (that-window (windmove-find-other-window direction nil this-window)) + (that-window (window-in-direction direction nil this-window)) (that-buffer (window-buffer that-window))) (when (or (minibufferp that-buffer) (window-dedicated-p this-window))