suzdraws / mintty

Automatically exported from code.google.com/p/mintty
0 stars 0 forks source link

Horizontal window scrolling #138

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
As far I know there is no way to disable wraping very long lines in mintty,
which I my opinion makes harder to fast analyze logging output (eg.
postgresql detailed log). Normally cygwin i.e. bash is running as cmd.exe
subprocess and display it's output there, where long lines could be
displayed without wraping. That is possible in cmd, when one set 'Screen
Buffer Size - width' to larger value than 'Window Size - width'.
Such a solution - add controlled buffer width size in addition to mintty
window size, will be very usefull, and will make possibility to prevent
long lines wrapping.

In addition to that, when buffer width > window width, 
and there is need to scroll window horizontally
one should be able to:
-disable/enable horizontal scroller
-scroll window horizontally by key combination
-scroll window horizontally by mouse whell + some enabler key eg. left alt
 (like in Adobe's apps - photoshop/illustrator etc.) 

Original issue reported on code.google.com by dominik....@gmail.com on 17 Oct 2009 at 6:18

GoogleCodeExporter commented 9 years ago
Actually there is a way to switch off auto-wrapping: the DECAWM control 
sequence, as
documented at http://vt100.net/docs/vt510-rm/DECAWM

echo $'\e[?7l': autowrap off
echo $'\e[?7h': autowrap on

Alternatively, you can pipe output through 'less', which does allow horizontal 
scrolling.

I don't intend to add a horizontal scrollbar.

Original comment by andy.koppe on 17 Oct 2009 at 6:54

GoogleCodeExporter commented 9 years ago
ps: 'less -S' disables line wrapping in less.

Original comment by andy.koppe on 17 Oct 2009 at 6:59

GoogleCodeExporter commented 9 years ago
I won't implement this.

Original comment by andy.koppe on 30 Jan 2010 at 10:39

GoogleCodeExporter commented 9 years ago
Your tool is not usable for me without horizontal scrolling. I have very long 
lines with logging statments that must start one below the other. Chopping of 
information is definitely not an option.

Original comment by nico.mos...@gmail.com on 19 May 2011 at 8:53

GoogleCodeExporter commented 9 years ago
Long lines are wrapped across multiple screen lines, same as in most other 
terminals, including xterm, rxvt, KDE Konsole, and Gnome Terminal. As far as I 
can see, none of them have an option for a horizontal scrollbar.

As stated above, you can pipe output into 'less -S' to avoid line wrapping. 
Within 'less', the left and right arrow keys can be used to scroll sideways.

I have to deal with very long output lines all the time, and I'd hate to have 
to scroll across ten window widths or more to spot the relevant bit of such 
lines, but apparently this is a matter of personal preference. Could you post 
example output where you would find it helpful?

One terminal that does implement horizontal scrolling is Terminator, so I've 
had a closer look at that. Here are some observations:

- It requires its own terminfo entry, with the auto_right_margin (am) 
capability disabled. Without this, editing long command lines in bash and 
elsewhere doesn't work. Terminator automatically creates that terminfo entry on 
the local machine, but users have to put it into place themselves on remote 
machines.

- Since the shell has to insert line breaks to emulate wrapping when editing 
long command lines, such lines can no longer be selected as one, i.e. double- 
and triple-clicking will only select within one screen line. When 
drag-selecting such a wrapped command line, it contains those line breaks, 
which means pasting it will not work as expected.

- For some reason, bash/readline doesn't use the rightmost column when editing 
long command lines. It's fine in zsh.

- The horizontal scrollbar range (necessarily) depends on how long the longest 
line in the scrollback happens to be, which can be quite random. If there's a 
real monster in there, it can make the scrollbar very difficult to use.

- Since wrapping by the terminal is nearly standard, there are bound to be 
applications that depend on it without checking.

In summary, this feature has some quite noticeable drawbacks, and the terminfo 
requirement means it's awkward to make it optional, which might be why it's 
compulsory in Terminator.

Having said that, the redesign of line storage needed to address issue 82 (line 
rebreaking on terminal resize) may make it fairly straightforward to add the 
horizontal scrollbar. Reopening with priority None.

Original comment by andy.koppe on 25 May 2011 at 5:50