Commit 226cf229 authored by Juri Linkov's avatar Juri Linkov
Browse files

Use split-window/delete-window to create a new window after saving window configuration

parent c54ac718
......@@ -5,7 +5,7 @@
;; Author: Juri Linkov <>
;; Keywords: windows
;; URL:
;; Version: 4.1
;; Version: 4.2
;; This package is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
......@@ -163,7 +163,13 @@ The first column shows `D' for for a window configuration you have
marked for deletion."
;; Handle the case when it's called in the active minibuffer.
(delete-other-windows (or (minibuffer-selected-window) (selected-window)))
;; Create a new window to replace the existing one, to not break the
;; window parameters (e.g. prev/next buffers) of the window just saved
;; to the window configuration. So when a saved window is restored,
;; its parameters left intact.
(split-window) (delete-window)
(let ((switch-to-buffer-preserve-window-point nil))
(switch-to-buffer (wincows-noselect)))
(message "Commands: d, x; RET; q to quit; ? for help."))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment