Skip to content

With a fix in PSReadLine, we don't have to return a "null" key press #1758

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

Merged
merged 1 commit into from
Apr 20, 2022

Conversation

andyleejordan
Copy link
Member

Which wasn't reliable anyway, because it could be translated to different things depending on the system and encodings in use. PSReadLine now just discards any key input after cancellation.

Requires PowerShell/PSReadLine#3274 and fixes #1754.

@andyleejordan
Copy link
Member Author

This requires that the PR in PSReadLine is merged an a new release pushed out, staying in draft until then.

@andyleejordan andyleejordan force-pushed the andschwa/readkey-race branch 2 times, most recently from 1f1220c to 9290afd Compare April 15, 2022 19:03
@andyleejordan
Copy link
Member Author

Ah ha! @SeeminglyScience now that ReadLine and ReadKey are well and truly canceled properly, I can revert the workaround in #1691 and it's getting much closer!
Screen Shot 2022-04-18 at 10 50 37 AM

@andyleejordan
Copy link
Member Author

The second commit is more of an aesthetic cleanup, it's not necessary to get that working perfectly to merge this, but we do need a patch release of PSReadLine, and I'd like to get this into the next RC.

@andyleejordan andyleejordan force-pushed the andschwa/readkey-race branch 2 times, most recently from 58a6db5 to 7d21d59 Compare April 20, 2022 18:18
Which wasn't reliable anyway, because it could be translated to
different things depending on the system and encodings in use.
PSReadLine now just discards any key input after cancellation.

This requires an update to PSReadLine v2.2.3.
@andyleejordan andyleejordan force-pushed the andschwa/readkey-race branch from 7d21d59 to 2a12c4b Compare April 20, 2022 21:56
@andyleejordan andyleejordan marked this pull request as ready for review April 20, 2022 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Resolve cancellation race with PSReadLine
2 participants