@@ -4560,20 +4560,18 @@ If ARG is empty, maximize the current window height."
4560
4560
With COUNT: Exchange current window with COUNTth window."
4561
4561
:repeat nil
4562
4562
(interactive "<c>")
4563
- (let ((this-buffer (window-buffer)))
4563
+ (let ((this-buffer (window-buffer))
4564
+ other-buffer other-window)
4564
4565
(if (not count)
4565
- (let ((next-buffer (window-buffer (next-window))))
4566
- (switch-to-buffer next-buffer nil t)
4567
- (select-window (next-window))
4568
- (switch-to-buffer this-buffer nil t))
4569
- (let (other-window other-buffer)
4570
- (save-window-excursion
4571
- (evil-window-next count)
4572
- (setq other-window (selected-window)
4573
- other-buffer (window-buffer)))
4574
- (switch-to-buffer other-buffer nil t)
4575
- (select-window other-window)
4576
- (switch-to-buffer this-buffer nil t)))))
4566
+ (setq other-buffer (window-buffer (next-window))
4567
+ other-window (next-window))
4568
+ (save-window-excursion
4569
+ (evil-window-next count)
4570
+ (setq other-buffer (window-buffer)
4571
+ other-window (selected-window))))
4572
+ (switch-to-buffer other-buffer nil t)
4573
+ (select-window other-window)
4574
+ (switch-to-buffer this-buffer nil t)))
4577
4575
4578
4576
(evil-define-command evil-window-move-very-top ()
4579
4577
"Closes the current window, splits the upper-left one horizontally
0 commit comments