[powershell] typing a character after scrolling up after Ctrl+L in TerminalScrolling mode will behave wrong #1620

Open
opened 2026-01-30 22:32:16 +00:00 by claunia · 0 comments
Owner

Originally created by @zadjii-msft on GitHub (Jun 12, 2019).

Originally assigned to: @zadjii-msft on GitHub.

From MSFT:20137864

see:
Bug 20108529: [host] virtual bottom does weird things with powershell control-L (see gif)

run powershell in a conhost with TerminalScrolling enabled.

run ls
type # foo
press ctrl+L
note that the viewport has moved down so the line with "# foo" is not at the top, and the rest of the viewport is empty. Note the scrollbar size.
scroll up with the mouse so that the cursor is no longer visible.
type a character.

expected:

  • the viewport will snap so that the line with the cursor is now at the top, like it was before scrolling.

actual:

  • the viewport will snap so that the line with the cursor is now at the bottom of the viewport.

This is definitely due to PSReadline, who implements the ^L handling.

I presume they're making the cursor visible manually, but I don't care to dig in too deep right now.

Originally created by @zadjii-msft on GitHub (Jun 12, 2019). Originally assigned to: @zadjii-msft on GitHub. From MSFT:20137864 see: Bug 20108529: [host] virtual bottom does weird things with powershell control-L (see gif) run powershell in a conhost with TerminalScrolling enabled. run `ls` type `# foo` press ctrl+L note that the viewport has moved down so the line with "# foo" is not at the top, and the rest of the viewport is empty. Note the scrollbar size. scroll up with the mouse so that the cursor is no longer visible. type a character. expected: * the viewport will snap so that the line with the cursor is now at the top, like it was before scrolling. actual: * the viewport will snap so that the line with the cursor is now at the bottom of the viewport. ---- This is definitely due to PSReadline, who implements the ^L handling. I presume they're making the cursor visible manually, but I don't care to dig in too deep right now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1620