Skip to content

Is switch-window-then-delete misbehaving? #96

Description

@drcxd

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))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions