Funky behavior when using cat, less, etc. over ssh #8221

Closed
opened 2026-01-31 01:23:51 +00:00 by claunia · 5 comments
Owner

Originally created by @WSLUser on GitHub (May 18, 2020).

Environment

Windows build number:  Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0
Windows Terminal version (if applicable): Version: 0.11.1333.0

Any other software?

Steps to reproduce

Open a brand new Terminal instance. Ssh to a remote Linux host from Powershell 7. Locate or create a text file that enough lines to scroll through several pages worth. I had results I filtered through from a scan I performed using a script that goes to stdout unless I pass a > somefile.txt. Then do cat sometextfile.txt | more. Observer the top line is removed after being visible for less than a second and you can not scroll to it. Use ^C to exit then use clear. Try using less instead. The first line is once again gone after being visible for less than a second. Also the 3rd line after a newline in my case repeated itself after showing about 7 lines including a newline of other entries before continuing with those entries. Now clear again. Here's where it gets really interesting, do a bunch of resizes (just hold onto the bottom right corner and drag it diagonally to shrink and increase the screen size of Terminal). Do a straighup cat (no more this time) and observe the top line of the text file is now viewable. However you get returned to a somewhat unresponsive prompt at the bottom line of the screen which shows part of a line entry of that text file. You can not press enter or ^C and have it do anything (looks like they are being eaten). You can however use the space bar to clear out the characters that filled the prompt and when they are gone, use backspace until you reach the beginning of the prompt. Then you can use ^C to get a new prompt at the bottom. Do the cat again with more used again. Now it appears to actually work the way it's intended.

One last note: In my settings.json, I have

"rowsToScroll": "100",
"historySize": 12000,

under "defaults". I also have retro terminal effects enabled but I haven't really used it (i.e. nothing in my terminal looks different) and I've set Tango Dark as my default color scheme. Otherwise, it's a default settings.json.

Expected behavior

I expect it to show every line correctly and for them all to be scrollable, dependent on your settings.json even after resizes.

Actual behavior

This does not work as intended. However this used to be just fine. I started noticing this in 1251 but hoped that the latest Terminal might change something. There might be several bugs here I reported and if so, I apologize. This is just what I did to get my screen to show everything I wanted it to.

Originally created by @WSLUser on GitHub (May 18, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0 Windows Terminal version (if applicable): Version: 0.11.1333.0 Any other software? ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> Open a brand new Terminal instance. Ssh to a remote Linux host from Powershell 7. Locate or create a text file that enough lines to scroll through several pages worth. I had results I filtered through from a scan I performed using a script that goes to stdout unless I pass a `> somefile.txt`. Then do `cat sometextfile.txt | more`. Observer the top line is removed after being visible for less than a second and you can not scroll to it. Use ^C to exit then use `clear.` Try using `less` instead. The first line is once again gone after being visible for less than a second. Also the 3rd line after a newline in my case repeated itself after showing about 7 lines including a newline of other entries before continuing with those entries. Now `clear` again. Here's where it gets really interesting, do a bunch of resizes (just hold onto the bottom right corner and drag it diagonally to shrink and increase the screen size of Terminal). Do a straighup `cat` (no `more` this time) and observe the top line of the text file is now viewable. However you get returned to a somewhat unresponsive prompt at the bottom line of the screen which shows part of a line entry of that text file. You can not press enter or ^C and have it do anything (looks like they are being eaten). You can however use the space bar to clear out the characters that filled the prompt and when they are gone, use backspace until you reach the beginning of the prompt. Then you can use ^C to get a new prompt at the bottom. Do the cat again with `more` used again. Now it appears to actually work the way it's intended. One last note: In my `settings.json`, I have ``` "rowsToScroll": "100", "historySize": 12000, ``` under "defaults". I also have retro terminal effects enabled but I haven't really used it (i.e. nothing in my terminal looks different) and I've set Tango Dark as my default color scheme. Otherwise, it's a default `settings.json`. # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> I expect it to show every line correctly and for them all to be scrollable, dependent on your settings.json even after resizes. # Actual behavior <!-- What's actually happening? --> This does not work as intended. However this used to be just fine. I started noticing this in 1251 but hoped that the latest Terminal might change something. There might be several bugs here I reported and if so, I apologize. This is just what I did to get my screen to show everything I wanted it to.
Author
Owner

@WSLUser commented on GitHub (May 18, 2020):

The remote host was a Fedora 30 server if it makes any difference when troubleshooting. And ssh is the 8.1 release on Win32 and 8.0 on the Fedora server.

@WSLUser commented on GitHub (May 18, 2020): The remote host was a Fedora 30 server if it makes any difference when troubleshooting. And ssh is the 8.1 release on Win32 and 8.0 on the Fedora server.
Author
Owner

@DHowett commented on GitHub (May 19, 2020):

If you make a selection, does it start redrawing the right things in the right places?

@DHowett commented on GitHub (May 19, 2020): If you make a selection, does it start redrawing the right things in the right places?
Author
Owner

@ghost commented on GitHub (May 23, 2020):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (May 23, 2020): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@WSLUser commented on GitHub (May 23, 2020):

bot still haven't had chance to reproduce.

@WSLUser commented on GitHub (May 23, 2020): bot still haven't had chance to reproduce.
Author
Owner

@ghost commented on GitHub (Jun 14, 2020):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Jun 14, 2020): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8221