Clear-screen bug after updating to Ubuntu 19.04 #1013

Closed
opened 2026-01-30 22:13:57 +00:00 by claunia · 1 comment
Owner

Originally created by @radium-v on GitHub (May 13, 2019).

  • Your Windows build number: 10.0.17763.475

  • What you're doing and what's happening:

  1. Open Ubuntu 19.04 with a terminal window:
    2019-05-12 (0)

  2. Type clear and hit enter
    2019-05-12 (1)
    2019-05-12 (2)

  3. The screen scrolls too far and the prompt is too far up
    2019-05-12 (3)

  4. Typing in the prompt even after scrolling up resets to the borked scroll positon:
    2019-05-12 (4)

  5. Resizing the window fixes the re-jumping but only if you scroll the prompt back into view first:
    2019-05-12 (5)

This started happening after upgrading to Ubuntu 19.04 and wasn't an issue before. I'm noticing some other weird stuff too:

  • As described in Microsoft/WSL#4015, the amount of lines the scrolling is off by is equal to the amount of lines that were present when the clear was called.
  • Manually scrolling the window to the top with the mouse brings the prompt back into view, though typing in the prompt resets the scroll position offscreen (by the entire incorrect offset).
  • If I scroll to the top, then resize the window, the scroll position is fixed. This only works if I haven't already started typing a new command
  • This is happening in both Windows Terminal as well as Visual Studio Code (1.33.1 system setup).
  • This happens when I run wsl.exe, ubuntu.exe, open the Ubuntu app shortcut, or open a terminal in Visual Studio Code.
  • The cls command in cmd works as expected.
  • Using clear -x does scroll into position as expected, but doesn't remove previous lines.
Originally created by @radium-v on GitHub (May 13, 2019). * Your Windows build number: 10.0.17763.475 * What you're doing and what's happening: 1. Open Ubuntu 19.04 with a terminal window: ![2019-05-12 (0)](https://user-images.githubusercontent.com/863023/57591182-20a96b80-74fe-11e9-8858-a9253cffdc14.png) 2. Type `clear` and hit enter ![2019-05-12 (1)](https://user-images.githubusercontent.com/863023/57591187-2901a680-74fe-11e9-8761-cc183d566933.png) ![2019-05-12 (2)](https://user-images.githubusercontent.com/863023/57591189-2bfc9700-74fe-11e9-9229-21fc9f4cf8b9.png) 3. The screen scrolls too far and the prompt is too far up ![2019-05-12 (3)](https://user-images.githubusercontent.com/863023/57591198-3454d200-74fe-11e9-94da-af3e0efcefdc.png) 4. Typing in the prompt even after scrolling up resets to the borked scroll positon: ![2019-05-12 (4)](https://user-images.githubusercontent.com/863023/57591210-4fbfdd00-74fe-11e9-8208-2f53cab47b3b.png) 5. Resizing the window fixes the re-jumping but *only* if you scroll the prompt back into view first: ![2019-05-12 (5)](https://user-images.githubusercontent.com/863023/57591245-69f9bb00-74fe-11e9-924d-79b3c6e50c00.png) This started happening after upgrading to Ubuntu 19.04 and wasn't an issue before. I'm noticing some other weird stuff too: * As described in Microsoft/WSL#4015, the amount of lines the scrolling is off by is equal to the amount of lines that were present when the `clear` was called. * Manually scrolling the window to the top with the mouse brings the prompt back into view, though typing in the prompt resets the scroll position offscreen (by the entire incorrect offset). * If I scroll to the top, then *resize the window*, the scroll position is fixed. This *only* works if I haven't already started typing a new command * This is happening in both Windows Terminal as well as Visual Studio Code (1.33.1 system setup). * This happens when I run `wsl.exe`, `ubuntu.exe`, open the Ubuntu app shortcut, or open a terminal in Visual Studio Code. * The `cls` command in `cmd` works as expected. * Using `clear -x` does scroll into position as expected, but doesn't remove previous lines.
claunia added the Product-ConhostArea-VTResolution-Duplicate labels 2026-01-30 22:13:57 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 13, 2019):

Since this is 17763, I'm inclined to believe this is a dupe of #270

@zadjii-msft commented on GitHub (May 13, 2019): Since this is 17763, I'm inclined to believe this is a dupe of #270
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1013