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

Add command to PSReadLine history before cancellation #1841

Merged
merged 1 commit into from Jun 24, 2022

Conversation

andyleejordan
Copy link
Member

@andyleejordan andyleejordan commented Jun 23, 2022

Otherwise PSReadLine thinks it's supposed to re-insert it in the buffer after execution.

This is an extension of #1823 which fixes PowerShell/vscode-powershell#3683, but fixes PowerShell/vscode-powershell#4041 too.

Otherwise PSReadLine thinks it's supposed to re-insert it in the buffer
after execution.
@andyleejordan
Copy link
Member Author

TODO: Somehow add a regression test!

@andyleejordan
Copy link
Member Author

@SeeminglyScience test thoroughly please! No rush, we can get this in tomorrow and cut a new preview.

@SeeminglyScience
Copy link
Collaborator

Testing looks good!

Only one thing to note, if anyone has a custom PSRL AddToHistoryHandler it's probably going to deadlock since we're on a different thread. This isn't really new and it's what happened before Rob's rewrite, so I think that's fine, just something to keep in mind.

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

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

LGTM!

@andyleejordan andyleejordan merged commit 854665f into master Jun 24, 2022
@andyleejordan andyleejordan deleted the andschwa/add-to-history branch June 24, 2022 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
2 participants