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.
This commit is contained in:
parent
4a08acd234
commit
e33b21dc46
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue