-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Lost new line character when using ReadFile #16223
Labels
Area-Input
Related to input processing (key presses, mouse, etc.)
Blocking-Ingestion
In-PR
This issue has a related PR
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-1
A description (P1)
Product-Conhost
For issues in the Console codebase
Milestone
Comments
This was referenced Nov 15, 2023
microsoft-github-policy-service bot
pushed a commit
that referenced
this issue
Nov 21, 2023
This fixes an issue where character-wise reading of an input like "abc" would return "a" to the caller, store "b" as a partial translation (= wrong) and return "c" for the caller to store it for the next call. Closes #16223 Closes #16299 ## Validation Steps Performed * `ReadFile` with a buffer size of 1 returns inputs character by character without dropping any inputs ✅ --------- Co-authored-by: Dustin L. Howett <duhowett@microsoft.com>
DHowett
added a commit
that referenced
this issue
Dec 4, 2023
This fixes an issue where character-wise reading of an input like "abc" would return "a" to the caller, store "b" as a partial translation (= wrong) and return "c" for the caller to store it for the next call. Closes #16223 Closes #16299 ## Validation Steps Performed * `ReadFile` with a buffer size of 1 returns inputs character by character without dropping any inputs ✅ --------- Co-authored-by: Dustin L. Howett <duhowett@microsoft.com> (cherry picked from commit 63b3820) Service-Card-Id: 91122022 Service-Version: 1.19
This was referenced Jan 22, 2024
DHowett
added a commit
that referenced
this issue
Jan 23, 2024
This fixes an issue where character-wise reading of an input like "abc" would return "a" to the caller, store "b" as a partial translation (= wrong) and return "c" for the caller to store it for the next call. Closes #16223 Closes #16299 ## Validation Steps Performed * `ReadFile` with a buffer size of 1 returns inputs character by character without dropping any inputs ✅ --------- Co-authored-by: Dustin L. Howett <duhowett@microsoft.com> (cherry picked from commit 63b3820) Service-Card-Id: 91108808 Service-Version: 1.18
Hey, is this being landed in release ? If yes, in which version |
This is staged for the next 1.18 servicing release! Sorry for the delay. |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area-Input
Related to input processing (key presses, mouse, etc.)
Blocking-Ingestion
In-PR
This issue has a related PR
Issue-Bug
It either shouldn't be doing this or needs an investigation.
Priority-1
A description (P1)
Product-Conhost
For issues in the Console codebase
Windows Terminal version
1.18.2822.0
Windows build number
10.0.22631.2361
Other Software
The problem was first noted in some other console application which is using
ReadFile
to read from the console. The problem was stripped down to a minimal programIt seems the unexpected behavior first occurred with #14745.
Steps to reproduce
Compile the program using your favorite C compiler and run it. Hit
<ENTER>
until the example exits.Expected Behavior
In the good case you have to hit
<ENTER>
twice and the program exits gracefully.Actual Behavior
In the bad case you have to hit
<ENTER>
three times and the last assert fires an error.The text was updated successfully, but these errors were encountered: