COOKED_READ with prompt the width of the buffer places the cursor inside prompt, mangles prompt #6624

Open
opened 2026-01-31 00:43:21 +00:00 by claunia · 1 comment
Owner

Originally created by @DHowett-MSFT on GitHub (Feb 25, 2020).

Migrated from MSFT:25341382.

Original description:

If the command prompt is as long as the terminal window is wide, then hitting Escape clips off the > character at the end of the prompt.

/cc @bviglietta

Originally created by @DHowett-MSFT on GitHub (Feb 25, 2020). Migrated from MSFT:25341382. Original description: > If the command prompt is as long as the terminal window is wide, then hitting Escape clips off the > character at the end of the prompt. /cc @bviglietta
claunia added the Product-ConhostIssue-BugPriority-3Area-Input labels 2026-01-31 00:43:21 +00:00
Author
Owner

@j4james commented on GitHub (Feb 25, 2020):

I believe this is just the delayed EOL wrap behaviour. I thought the COOKED_READ code did all of its output directly through the WriteCharsLegacy, but it seems the prompt itself is still output via a WriteConsole call, and is thus subject to VT rules (which includes delayed wrapping). If we want to keep VT mode enabled in the cmd shell, maybe we need an additional flag to disable delayed wrap behaviour.

@j4james commented on GitHub (Feb 25, 2020): I believe this is just the delayed EOL wrap behaviour. I thought the COOKED_READ code did all of its output directly through the `WriteCharsLegacy`, but it seems the prompt itself is still output via a `WriteConsole` call, and is thus subject to VT rules (which includes delayed wrapping). If we want to keep VT mode enabled in the cmd shell, maybe we need an additional flag to disable delayed wrap behaviour.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6624