Function: treemacs--windmove-swap-state-advice
treemacs--windmove-swap-state-advice is a byte-compiled function
defined in treemacs-compatibility.el.
Signature
(treemacs--windmove-swap-state-advice ORIGINAL-FN &rest ARGS)
Documentation
Advice for windmove-swap-state-* functions to ignore treemacs.
These commands do not seem to be compatible with side windows (and thus treemacs
in its default configuration), so this advice changes them to do nothing when
the selected-window is treemacs.
For all other cases ORIGINAL-FN is called with original ARGS.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-compatibility.el
(with-eval-after-load 'windmove
(defun treemacs--windmove-swap-state-advice (original-fn &rest args)
"Advice for windmove-swap-state-* functions to ignore treemacs.
These commands do not seem to be compatible with side windows (and thus treemacs
in its default configuration), so this advice changes them to do nothing when
the `selected-window' is treemacs.
For all other cases ORIGINAL-FN is called with original ARGS."
(unless (and treemacs-display-in-side-window
(treemacs-is-treemacs-window-selected?))
(apply original-fn args)))
(with-no-warnings
(advice-add 'windmove-swap-states-in-direction
:around #'treemacs--windmove-swap-state-advice)))