Skip to content

Conversation

@cameronr
Copy link
Collaborator

Handle the case when the history dialog is open and an item is selected before the input/output windows are created.

Fixes #141

Handle the case when the history dialog is open and an item is selected
before the input/output windows are created.

Fixes sudo-tee#141
Copilot AI review requested due to automatic review settings December 17, 2025 22:02
@cameronr
Copy link
Collaborator Author

Even with the async changes, I think it's safe to just set windows right after because any yields would come after the state.windows gets set in core.open

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where the history picker would error when selecting an item if the input/output windows were not already open. The fix ensures that after opening windows, the local windows variable is updated to reference the newly created windows.

Key Changes

  • Updates the local windows variable after calling core.open() to ensure it references the newly created windows in state.windows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sudo-tee
Copy link
Owner

Thanks for the quick fix

@sudo-tee sudo-tee merged commit bd3073b into sudo-tee:main Dec 17, 2025
11 checks 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.

Telescope history picker got nil report

2 participants