]> git.eshelyaron.com Git - emacs.git/commitdiff
In `window--display-buffer' fix behavior reported in Bug#25946
authormartin rudalics <rudalics@gmx.at>
Sun, 5 Mar 2017 11:26:26 +0000 (12:26 +0100)
committerStephen Berman <stephen.berman@gmx.net>
Sun, 5 Mar 2017 11:26:26 +0000 (12:26 +0100)
* lisp/window.el (window--display-buffer): Set the dedicated
status of the window used and clear its history of previous
buffers also for the case that the window already shows the
buffer to be displayed.  (Bug#25946)

lisp/window.el

index 358d7bc58f0e82e9887953eb6382fb215ce394e0..505024342eda2c454f810f4022d500ab9d1efc08 100644 (file)
@@ -6643,11 +6643,11 @@ live."
     (display-buffer-record-window type window buffer)
     (unless (eq buffer (window-buffer window))
       (set-window-dedicated-p window nil)
-      (set-window-buffer window buffer)
-      (when dedicated
-       (set-window-dedicated-p window dedicated))
-      (when (memq type '(window frame))
-       (set-window-prev-buffers window nil)))
+      (set-window-buffer window buffer))
+    (when dedicated
+      (set-window-dedicated-p window dedicated))
+    (when (memq type '(window frame))
+      (set-window-prev-buffers window nil))
     (let ((quit-restore (window-parameter window 'quit-restore))
          (height (cdr (assq 'window-height alist)))
          (width (cdr (assq 'window-width alist)))