terminal icon indicating copy to clipboard operation
terminal copied to clipboard

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

Open c0d3h4x0r opened this issue 6 years ago • 114 comments


Note: 📌 Pinned comment: https://github.com/microsoft/terminal/issues/1860#issuecomment-1622136376


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 avatar Jul 07 '19 23:07 c0d3h4x0r

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!

DHowett-MSFT avatar Jul 08 '19 00:07 DHowett-MSFT

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

c0d3h4x0r avatar Jul 08 '19 01:07 c0d3h4x0r

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*

caitlynrw avatar Jul 08 '19 08:07 caitlynrw

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.

egmontkob avatar Jul 08 '19 11:07 egmontkob

Yea I don't think we're going to change this, for the exact reason mentioned by @egmontkob. What we're trying to build is a terminal, not a console. While the horizontal scrollbar made sense in the console, where the viewport could be smaller than the buffer in both the x and y directions, a terminal's viewport is fundamentally the same size as the buffer.

Even if we added this setting to the Terminal, it's still connected to conpty, which is acting like a terminal buffer itself, and it won't emit sequences that act like the old console did.

zadjii-msft avatar Jul 08 '19 17:07 zadjii-msft

Then I guess I won't be adopting Windows Terminal after all, because that's a dealbreaker for me.

c0d3h4x0r avatar Jul 08 '19 18:07 c0d3h4x0r

I need horizontal scrolling and wrapping disabled too

AlwaysHC avatar Jan 02 '20 07:01 AlwaysHC

Cmd and ConsoleZ have this feature

AlwaysHC avatar Jan 02 '20 07:01 AlwaysHC

@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?

zadjii-msft avatar Jan 02 '20 13:01 zadjii-msft

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

c0d3h4x0r avatar Jan 03 '20 17:01 c0d3h4x0r

@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

AlwaysHC avatar Jan 15 '20 17:01 AlwaysHC

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.

matthewgdv avatar Feb 06 '20 10:02 matthewgdv

Would love to see a configurable horizontal size with horizontal scroll-bar. Something similar to cmd window would be great.

Until this feature is implemented, i'll be sticking with the default Ubuntu shell.

4nqyi avatar May 15 '20 22:05 4nqyi

Both issues are closed now, however we don't have the possibility to disable the word wrap yet :(

AlwaysHC avatar Jun 16 '20 23:06 AlwaysHC

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.

marveloo avatar Jun 30 '20 23:06 marveloo

I was happy with trying the new Windows Terminal, but when I needed to turn off word-wrapping (because I wanted to use Oracle SQL*Plus and make some queries, etc.), to my surprise, I realized that it was not actually possible. That seems really silly to me. I guess I'll have to go back to using the classic command prompt for the most part.

jschiold avatar Sep 14 '20 07:09 jschiold

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?

DHowett avatar Sep 20 '20 21:09 DHowett

The behavior ought to be exactly the same as Command Prompt has been for ages: word-wrap, but only beyond a buffer width that the user can configure to be much wider than the actual window width. For example, allow me to set the buffer width to 9999 characters, so that word wrapping does not occur until the 10000th character on each line (which should effectively never wrap).

c0d3h4x0r avatar Sep 20 '20 22:09 c0d3h4x0r

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.

j4james avatar Sep 21 '20 00:09 j4james

I totally agree with @c0d3h4x0r. As long as it can at the very least do exactly what CMD already does regarding large buffer sizes, I'll be happy. Currently I can't use this new terminal for any form of interesting ASCII-fied output, such as a database table returned by a SQL query.

matthewgdv avatar Sep 21 '20 07:09 matthewgdv

if you are using psql, try this when running it:

PAGER="less -S" psql ...

it will let you scroll horizontally like @j4james mentioned

rossmassey avatar Sep 24 '20 22:09 rossmassey

I also like to disable word wrapping for wide output which may be truncated at e.g. 500 char width but until then I do not want to see parts of it on the next line. One extreme example is e..g C>wmic process which needs ca. a width of 2000 to become readable. Tabular data is not uncommon. I can zoom out on my 4K monitor to some extent but this is still an big issue to become a console I would like to use always over the "old" one.

Alois-xx avatar Oct 26 '20 19:10 Alois-xx

Ya this feature is a must or simply can't use this terminal for developing with docker, the output especially for stat commands is super wide and with line wrap its unreadable

newtoniumx3 avatar Oct 30 '20 23:10 newtoniumx3

so it this feature request dropped? or are we expecting to have it at some point?

cmario92 avatar Dec 04 '20 08:12 cmario92

The official plan is no, we're not planning on supporting this. I'd be shocked to find another terminal emulator that's not conhost that supports this. If an application is emitting output that's too wide for the buffer, then that sounds like the app has a bad UX, not the Terminal, since all terminal emulators will have that bad UX (IMO).

<bottle-feeding thought>

We could add an experimental.minimumBufferWidth setting. When we do resizes, we make sure the conpty buffer is always at least that big, regardless of the terminal viewport width. I'm sure there would be weird edge cases. We'd need to make sure that the handling of cursor positioning in the Terminal buffer isn't too reliant on the terminal viewport, but instead the underlying buffer.

I really have no idea how bad the UX would be. But it would be a place to start.

I'd absolutely stick this as an experimental. setting, because I want to make sure it's clear that it's an unsupported scenario.

</bottle-feeding thought>

zadjii-msft avatar Dec 04 '20 14:12 zadjii-msft

"We're not going to do what users are begging for, because we are more interested in finding excuses to be lazy and weasel our way out of it."

Typical Microsoft, not listening to your users.

c0d3h4x0r avatar Dec 04 '20 17:12 c0d3h4x0r

Can't we just lie to the terminal, say, real width is 500, but only show 80 to user, and a horizontal scroll?

This issue is a deal breaker for me, because I use horizontal scroll a lot on cmd and powershell to observe log. And logs are not always design for 80x24, sometimes it's really really long.

With horizontal scroll, 1 line of log, most of the time, means 1 thing happened, 3 lines?, 3 things, simple. With current line-wrapping, 1 line of log == multiple lines of logs -> consume all the terminal space.

pc223 avatar Dec 05 '20 08:12 pc223

The regular Windows Command Prompt solves this in a simple and elegant way. image I will have to continue using that instead.

jschiold avatar Dec 07 '20 07:12 jschiold

Please count me as another user who thinks Windows Terminal is great, but force word wrapping makes this product unusable - the output becomes unreadable in many situations where it exceeds the current horizontal size.

dje-dev avatar Dec 29 '20 01:12 dje-dev

same for me: I am running Oracle's sqlplus and many output line width >200 characters. need Windows terminal provide horizontal screen bar feature. I am so excited to use new Windows terminal until I see this issue and I am very regret to stop using this product. I will switch back in future once this feature is available.

kzhangkzhang avatar Feb 17 '21 15:02 kzhangkzhang