emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/windower 63b94d6: Don't switch to last buffer when wind


From: Stefan Monnier
Subject: [elpa] externals/windower 63b94d6: Don't switch to last buffer when window is dedicated.
Date: Tue, 16 Mar 2021 09:42:33 -0400 (EDT)

branch: externals/windower
commit 63b94d6436c2f7ef8018783a10a3579010154022
Author: Pierre Neidhardt <mail@ambrevar.xyz>
Commit: Pierre Neidhardt <mail@ambrevar.xyz>

    Don't switch to last buffer when window is dedicated.
---
 windower.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/windower.el b/windower.el
index 2cec69f..df79d2b 100644
--- a/windower.el
+++ b/windower.el
@@ -152,7 +152,9 @@ If W2 is a window too, swap both."
 (defun windower-switch-to-last-buffer ()
   "Switch to last open buffer in current window."
   (interactive)
-  (switch-to-buffer (other-buffer (current-buffer) 1)))
+  (if (window-dedicated-p)
+      (message "Window is dedicated to its buffer")
+    (switch-to-buffer (other-buffer (current-buffer) 1))))
 
 ;;; TODO: Store window configurations in a buffer-name-indexed alist? Not
 ;;; sure that would ever be useful.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]