refactor(evil): use window-swap-states in +evil--window-swap
Taking a look at the built in windmove functions shows that Emacs has a built in function for swapping windows called `window-swap-states`. Using this ensures the window state is maintained. Ref: #6023 Co-authored-by: luveti <luveti@users.noreply.github.com>
This commit is contained in:
parent
b2b19e7196
commit
1d41ee0c1a
1 changed files with 1 additions and 4 deletions
|
@ -69,10 +69,7 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')."
|
|||
(with-selected-window that-window
|
||||
(switch-to-buffer (doom-fallback-buffer)))
|
||||
(setq that-buffer (window-buffer that-window)))
|
||||
(with-selected-window this-window
|
||||
(switch-to-buffer that-buffer))
|
||||
(with-selected-window that-window
|
||||
(switch-to-buffer this-buffer))
|
||||
(window-swap-states this-window that-window)
|
||||
(select-window that-window))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue