Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal desperately needs a horizontal scrollbar (similar to Command Prompt) #1860

Open
c0d3h4x0r opened this issue Jul 7, 2019 · 101 comments
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.
Milestone

Comments

@c0d3h4x0r
Copy link

c0d3h4x0r commented Jul 7, 2019


Note: 📌 Pinned comment: #1860 (comment)


Summary of the new feature/enhancement

Windows Terminal needs to have a configurable horizontal scrollbar (similar to Command Prompt) so that lines longer than the window width are actually readable by scrolling to the right, rather than being a big indecipherable word-wrapped mess as is typically seen on UNIX-like systems.

Proposed technical implementation details (optional)

Make it so.

@c0d3h4x0r c0d3h4x0r added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Jul 7, 2019
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jul 7, 2019
@DHowett-MSFT
Copy link
Contributor

indecipherable word-wrapped mess

I mean, that seems a little strong. One of the biggest requests we had for Windows 10 was to add support for wrapping to the traditional/legacy console!

@c0d3h4x0r
Copy link
Author

That's because I feel strongly about it :) I absolutely hate line-wrapped console output... always have.

@caitlynrw
Copy link

caitlynrw commented Jul 8, 2019

Maybe make it a config,

"text-wrap": false

when true does as it does now, false gives horizontal scrollbar.

Edit: I didn't read the original post correctly, so proposed config*

@egmontkob
Copy link

The traditional Unix terminal emulation (using ANSI escape sequences) is pretty much incompatible with this idea. See e.g. https://bugzilla.gnome.org/show_bug.cgi?id=769440.

@zadjii-msft

This comment was marked as outdated.

@zadjii-msft zadjii-msft added Product-Terminal The new Windows Terminal. Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons. labels Jul 8, 2019
@c0d3h4x0r

This comment was marked as off-topic.

@AlwaysHC

This comment was marked as off-topic.

@AlwaysHC

This comment was marked as off-topic.

@zadjii-msft
Copy link
Member

@AlwaysHC Could you elaborate more on why you need this feature? I don't think I really understand the use case. Maybe there's some way to make your workflow work in the Windows Terminal without a horizontal scrollbar?

@c0d3h4x0r
Copy link
Author

@zadjii-msft Because wrapped lines are obnoxiously more difficult to visually parse.

@AlwaysHC
Copy link

@AlwaysHC Could you elaborate more on why you need this feature? I don't think I really understand the use case. Maybe there's some way to make your workflow work in the Windows Terminal without a horizontal scrollbar?

tail -f /var/log/messages

@matthewgdv
Copy link

I'm in agreement that we need this feature. I use a lot of interactive workflows that display asciified tables in the terminal (which are often several screen-lengths long) and having them be wrapped is a dealbreaker since it turns them into illegible gibberish. Likewise with several other forms of console output where the formatting across lines is important. Please implement horizontal scrolling as an option because currently I think this terminal will be useless to a lot of users with similar requirements.

@4nqyi

This comment was marked as off-topic.

@AlwaysHC

This comment was marked as off-topic.

@marveloo
Copy link

I am copying the question which I asked here: #6730

Why is Windows terminal unable to load a wide window (of fixed width) behind the scenes with only a part of the window visible to the user and a horizontal scrollbar to move that window from side to side? The shell itself may not even be aware of me staring at it throw a smaller size window. In other words all this thing could be implemented on the UI part only by letting the shell think that I am on a wider window than it actually is.

@jschiold

This comment was marked as off-topic.

@DHowett
Copy link
Member

DHowett commented Sep 20, 2020

If we make any changes here, they are going to be in line with other terminal emulators that have established precedent: the typical options are wrap or truncate. Would truncate be more to your liking?

@c0d3h4x0r
Copy link
Author

c0d3h4x0r commented Sep 20, 2020 via email

@j4james
Copy link
Collaborator

j4james commented Sep 21, 2020

I think the confusion here stems from the fact that some people were expecting a kind of "infinite" width, that would expand as more content was written out. I don't think that is feasible for a terminal. However, a wide (but fixed size) buffer within a smaller viewport is a different matter. As had been mentioned, we already support that in the conhost console. And it's worth mentioning that some of the DEC terminals supported a similar concept, so it's not without precedent.

That said, for many of the use cases mentioned, you can probably get by with piping your output through less -S. That should give you an unwrapped view of the content that can be scrolled horizontally.

@matthewgdv

This comment was marked as off-topic.

@zadjii-msft
Copy link
Member

Fair enough. That was noodling on the UX, not a definite requirement.

So either the scrollbar space is allocated up front, regardless of whether it's initially visible

This seems infinitely easier than reveal on hover. At least the winui scroll bars are pretty subtle when not moused over.

@zadjii-msft
Copy link
Member

Well, I hate the code. And I hate that the DX and Atlas engines both seem to not support horizontal scrolling (even in conhost).

but like, proof of concept:

seriously-just-use-less-001

zadjii-msft added a commit that referenced this issue Jul 13, 2023
@j4james
Copy link
Collaborator

j4james commented Jul 13, 2023

I hate that the DX and Atlas engines both seem to not support horizontal scrolling

DX seems to work for me. Atlas has a few issues, but I'm almost sure it used to work in the past, so maybe there's something that regressed recently.

DHowett pushed a commit that referenced this issue Jul 18, 2023
This commit fixes a number of issues around horizontal scrolling.
DxEngine only had one bug, where the clip rect would cause any content
outside of the actual viewport to be invisible. AtlasEngine had more
bugs, mostly around the conversion from textbuffer-relative coordinates
to viewport-relative coordinates, since AtlasEngine stores things like
the cursor position, attributes, etc., relative to the viewport.

It also renames `cellCount` to `viewportCellCount`, because I realized
that it might have to deal with a `textBufferCellCount` or similar in
the future. I hope that the new name is more descriptive of what it
refers to.

Future improvements to AtlasEngine in particular would be to not copy
the entire `Settings` struct every time the horizontal scroll offset
changes, and to trim trailing whitespace before shaping text.

This is in preparation for #1860

## Validation Steps Performed
* Patch `RenderingTests` to run in the main (and not alt) buffer
* Horizontal scrolling of line renditions and attributes works ✅
* Selection retains its position (mostly) ✅
DHowett pushed a commit that referenced this issue Sep 22, 2023
This commit fixes a number of issues around horizontal scrolling.
DxEngine only had one bug, where the clip rect would cause any content
outside of the actual viewport to be invisible. AtlasEngine had more
bugs, mostly around the conversion from textbuffer-relative coordinates
to viewport-relative coordinates, since AtlasEngine stores things like
the cursor position, attributes, etc., relative to the viewport.

It also renames `cellCount` to `viewportCellCount`, because I realized
that it might have to deal with a `textBufferCellCount` or similar in
the future. I hope that the new name is more descriptive of what it
refers to.

Future improvements to AtlasEngine in particular would be to not copy
the entire `Settings` struct every time the horizontal scroll offset
changes, and to trim trailing whitespace before shaping text.

This is in preparation for #1860

## Validation Steps Performed
* Patch `RenderingTests` to run in the main (and not alt) buffer
* Horizontal scrolling of line renditions and attributes works ✅
* Selection retains its position (mostly) ✅

(cherry picked from commit 89c39b0)
Service-Card-Id: 90625739
Service-Version: 1.18
@bigvzhang
Copy link

The problem seems resolved. But I don't know how to configure it on my desktop. Would you guys kindly tell me how to do it?

@AloisKraus
Copy link

@bigvzhang: The issue #15707 which is merged just deals with bugs in the rendering engine. The bug fixes which are needed later to implement the feature are now shipped with the next release. I do not see any scrolling code in the public.

@zadjii-msft
Copy link
Member

That's correct. I only ever got this to a WIP state. My notes are up in #1860 (comment). Not sure I'll have time to loop back around to polish for shipping any time soon.

@larioteo

This comment was marked as spam.

@simonjha
Copy link

Yes, we absolutely need this feature, which "Command Prompt" provided before through its properties-buffer setting.

We've been using "Command Prompt" console to print the application logs, which are long string lines. When we read those lines, we definitely don't want the text line wrapped, but want a horizontal scrolling.

It is so bad that it lost this function, after "Command Prompt" was moved to Windows Terminal.

By the way, we mostly use "Command Prompt" console to SSH to the Unix systems to read app log text files having the long string lines. If the lines are wrapped, no way you can read them.

So, please, please add non-word-wrap & horizontal scrollbar back in Windows Terminal.

@BerndHme
Copy link

Please add word wrapping.
Like the VS output console can.
There is a toggle button.

@karunkrishna
Copy link

Seeing data on a horizontal scroll would be killer
Currently need to subset data columns or shrink terminal to non-legible level just to view data in tabular format.

image

@thisismygitrepo

This comment was marked as off-topic.

@microsoft microsoft deleted a comment from Fetrovsky Feb 10, 2024
@cesar-o9
Copy link

Seeing data on a horizontal scroll would be killer Currently need to subset data columns or shrink terminal to non-legible level just to view data in tabular format.

image

You can try "tput rmam" (remove auto margin). that works for me. to reset it "tput smam" to set it again.

@zehawki
Copy link

zehawki commented Mar 31, 2024

Yup here is another example of unreadable madness:

image

@Cremesis

This comment was marked as duplicate.

@marbaa

This comment was marked as spam.

@zadjii-msft zadjii-msft added the Help Wanted We encourage anyone to jump in on these. label May 9, 2024
@Cfun1
Copy link

Cfun1 commented Jun 9, 2024

I have the latest version of windows command line terminal. When executing a console app from VS that prints long line (just few characters off screen), there is no word wrap being applied nor horizontal scroll available also I can't find any relevant setting. The only way is to select and move mouse cursor to right direction to be able to see off screen text of the long line

@scharnyw
Copy link

As mentioned in #6895 (comment), a workaround for now is to temporarily decrease the font size with ctrl-minus

@mcdonamw
Copy link

That's not a good workaround. In many cases, e.g., that screenshot above, you'd have to lower the font to the point it was unreadable.

@mcdonamw
Copy link

mcdonamw commented Aug 22, 2024

One of the biggest requests we had for Windows 10 was to add support for wrapping to the traditional/legacy console!

keyword: add

@lynnewu
Copy link

lynnewu commented Oct 3, 2024

PowerShell table-formatted output often exceeds the horizontal width of even my full-width monitors. My current solution is to snap the window open a couple monitors wide (or more) to see everything. Wrapping output results in an unparseable mess. Definitely want a horizontal scroll bar (or even just the ability to scroll horizontall with a mouse h-scroll wheel).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Output Related to output processing (inserting text into buffer, retrieving buffer text, etc.) Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. Product-Terminal The new Windows Terminal. Resolution-By-Design It's supposed to be this way. Sometimes for compatibility reasons.
Projects
None yet
Development

No branches or pull requests