Function: evil-window-mru

evil-window-mru is an interactive and byte-compiled function defined in evil-commands.el.

Signature

(evil-window-mru)

Documentation

Move the cursor to the previous (last accessed) buffer in another window.

More precisely, it selects the most recently used buffer that is shown in some other window, preferably of the current frame, and is different from the current one.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-commands.el
(evil-define-command evil-window-mru ()
  "Move the cursor to the previous (last accessed) buffer in another window.
More precisely, it selects the most recently used buffer that is
shown in some other window, preferably of the current frame, and
is different from the current one."
  :repeat nil
  (catch 'done
    (dolist (buf (buffer-list (selected-frame)))
      (let ((win (get-buffer-window buf)))
        (when (and (not (eq buf (current-buffer)))
                   win
                   (not (eq win (selected-window))))
          (select-window win)
          (throw 'done nil))))))