Ubuntu - less command centers the text #16653

Closed
opened 2026-01-31 05:18:36 +00:00 by claunia · 2 comments
Owner

Originally created by @Turum on GitHub (Feb 4, 2022).

Windows Terminal version

1.12.3472.0

Windows build number

10.0.19044.1466

Other Software

Ubuntu-20.04

Steps to reproduce

  1. Create text file with several lines.
  2. Open this file with "less" command.

Expected Behavior

image

Actual Behavior

image

Originally created by @Turum on GitHub (Feb 4, 2022). ### Windows Terminal version 1.12.3472.0 ### Windows build number 10.0.19044.1466 ### Other Software Ubuntu-20.04 ### Steps to reproduce 1. Create text file with several lines. 2. Open this file with "less" command. ### Expected Behavior ![image](https://user-images.githubusercontent.com/19665888/152613282-2adde7ab-2306-47d1-923c-53975431badb.png) ### Actual Behavior ![image](https://user-images.githubusercontent.com/19665888/152613559-6873100c-9904-414b-a1f4-7bdb0773fc74.png)
claunia added the Resolution-By-DesignNeeds-TriageArea-VTNeeds-Tag-Fix labels 2026-01-31 05:18:37 +00:00
Author
Owner

@j4james commented on GitHub (Feb 6, 2022):

I believe this is working as expected. I'm assuming your command prompt was half way down the page when you started less, and it just starts writing out the content at the line you were on. I see the exact same behaviour in XTerm, Gnome Terminal, and Mintty.

The fact that the old conhost shell is displaying the output at the top of the page was a bug that has since been fixed (PR #10843). It was originally resetting the cursor position to the top left whenever an application switched to the alternate buffer (which less is doing), but that was a mistake.

@j4james commented on GitHub (Feb 6, 2022): I believe this is working as expected. I'm assuming your command prompt was half way down the page when you started `less`, and it just starts writing out the content at the line you were on. I see the exact same behaviour in XTerm, Gnome Terminal, and Mintty. The fact that the old conhost shell is displaying the output at the top of the page was a bug that has since been fixed (PR #10843). It was originally resetting the cursor position to the top left whenever an application switched to the alternate buffer (which `less` is doing), but that was a mistake.
Author
Owner

@zadjii-msft commented on GitHub (Feb 7, 2022):

Yea, this is now working by design. gnome-terminal vs Terminal

image

image

@zadjii-msft commented on GitHub (Feb 7, 2022): Yea, this is _now_ working by design. `gnome-terminal` vs Terminal ![image](https://user-images.githubusercontent.com/18356694/152844631-c7f1270c-ec37-45cb-ba1d-f0a3997e977a.png) ![image](https://user-images.githubusercontent.com/18356694/152844685-58b46f01-d47a-402d-b4e7-105dced7f997.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16653