Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't reset the last buffer state if we can't find it #136

Merged
merged 2 commits into from
Jan 7, 2024

Conversation

ttuegel
Copy link
Contributor

@ttuegel ttuegel commented Nov 5, 2023

This pull request makes two changes:

  1. Move the definition of boon-reset-state-for-switchw to the top level. This makes it easier to attach the debugger or override the definition.
  2. Don't try to reset the state of the old selected buffer if we can't find it. Sometimes, the old selected window is nil (e.g. at Emacs startup). Or, we might be given a frame instead of a window.

Defining this function at top level makes it easier to attach the debugger or
override the definiton.
`old-selected-window` may return a frame instead of a window, or `nil` if there
is not a previous window selection (e.g. at Emacs startup). In either of these
cases, trying to find the old buffer and reset its state would produce an error,
so do nothing instead.
@ttuegel ttuegel changed the title Reset state for switchw Don't reset the last buffer state if we can't find it Nov 5, 2023
@jyp jyp merged commit 79ac157 into jyp:master Jan 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants