From e33b21dc4600b8c69dab687211f54b0f517996a7 Mon Sep 17 00:00:00 2001 From: Benjamin Picardat Date: Wed, 10 Mar 2021 15:48:31 +0100 Subject: [PATCH] Fix #4770: New window is focused after split According to the documentation of `evil-window-split` the variable `evil-split-window-below` needs to be non-nil for the new window to be created below; and for `evil-window-vsplit` it is the variable `evil-vsplit-window-right` that needs to be non-nil for the window to be created on the right. --- modules/editor/evil/autoload/evil.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/editor/evil/autoload/evil.el b/modules/editor/evil/autoload/evil.el index cfddf3517..e44f71216 100644 --- a/modules/editor/evil/autoload/evil.el +++ b/modules/editor/evil/autoload/evil.el @@ -95,17 +95,17 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')." ;;;###autoload (defun +evil/window-split-and-follow () "Split current window horizontally, then focus new window. -If `evil-vsplit-window-right' is non-nil, the new window isn't focused." +If `evil-split-window-below' is non-nil, the new window isn't focused." (interactive) - (let ((evil-vsplit-window-right (not evil-vsplit-window-right))) + (let ((evil-split-window-below (not evil-split-window-below))) (call-interactively #'evil-window-split))) ;;;###autoload (defun +evil/window-vsplit-and-follow () "Split current window vertically, then focus new window. -If `evil-split-window-below' is non-nil, the new window isn't focused." +If `evil-vsplit-window-right' is non-nil, the new window isn't focused." (interactive) - (let ((evil-split-window-below (not evil-split-window-below))) + (let ((evil-vsplit-window-right (not evil-vsplit-window-right))) (call-interactively #'evil-window-vsplit))) ;;;###autoload (autoload '+evil:apply-macro "editor/evil/autoload/evil" nil t)