I expect the behavior of switch-window-then-delete should be deleting some other window instead of the current one. When there are more than 2 windows, it deletes the window specified by the user input. However, when there are only 2 windows, it deletes the current one and keep the other. In the source code I can see that there is an alias delete-other-window for this function, so I assume currently the implementation of this function does not match its intended behavior?
Current implementation:
(defun switch-window-then-delete ()
"Display an overlay in each window showing a unique key.
In the mean time, user will be asked to choose the window deleted."
(interactive)
(switch-window--then
"Delete window: "
#'delete-window
#'delete-window t))
Maybe it should be something like:
(defun switch-window-then-delete ()
"Display an overlay in each window showing a unique key.
In the mean time, user will be asked to choose the window deleted."
(interactive)
(switch-window--then
"Delete window: "
#'delete-other-windows
#'delete-window t))
I expect the behavior of
switch-window-then-deleteshould be deleting some other window instead of the current one. When there are more than 2 windows, it deletes the window specified by the user input. However, when there are only 2 windows, it deletes the current one and keep the other. In the source code I can see that there is an aliasdelete-other-windowfor this function, so I assume currently the implementation of this function does not match its intended behavior?Current implementation:
Maybe it should be something like: