Merge pull request #4772 from bpic/fix-split-and-follow

Fix #4770: New window is focused after split
This commit is contained in:
Henrik Lissner 2021-03-10 10:28:57 -05:00 committed by GitHub
commit cbe4546cb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)