Bug 62380 - Disable word wrap in Konsole.
Summary: Disable word wrap in Konsole.
Status: NEEDSINFO WAITINGFORINFO
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: master
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 62509 67157 117152 397597 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-08 13:28 UTC by dpavlotzky
Modified: 2024-04-13 13:08 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Add 'Enable Word Wrap' option - V1 (40.31 KB, patch)
2008-03-24 15:05 UTC, Robert Knight
Details
Patch to remove wordwrap (41.37 KB, patch)
2009-03-14 07:00 UTC, Kurt Hindenburg
Details
attachment-352116-0.html (1.20 KB, text/html)
2023-09-03 22:31 UTC, tcanabrava
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dpavlotzky 2003-08-08 13:28:03 UTC
Version:            (using KDE KDE 3.1.2)
Installed from:    Gentoo Packages
Compiler:          gcc 3.2.3 
OS:          Linux

I was using konsole to do some database queries. The results where big so the output gets distributed accross multiple lines.

Would it be possible to implement a wordwrap toggle, so it would be possible to get everything on one line. I think that would realy improve readability of these sort of queries.

kind regards,

David Pavlotzky
Comment 1 Thiago Macieira 2003-08-08 13:59:13 UTC
I'm sorry, but how do you propose we do that? A horizontal scrollbar? 
 
That just doesn't exist in terminals. When something gets to the end of a line, it 
automatically goes down to the next line, causing scrolling if needed. 
 
Comment 2 Waldo Bastian 2003-08-08 14:15:39 UTC
Subject: Re: [Konsole-devel]  disable wordwrap in konsole

On Friday 08 August 2003 13:59, Thiago Macieira wrote:
> I'm sorry, but how do you propose we do that? A horizontal scrollbar?

It would technically be possible to have the logical screen size wider than 
the visible screen size but many applications running in konsole will then 
try to use the full width of the logical screen size which may cause more 
problems than it is worth. A significant portion of these applications will 
then not be visible.

An alternative could be to use a large logical screen size but report the 
visible screen size to the applications running in konsole, but I think that 
that will cause many applications, including the command shell, to 
miscalculate the position of text, leading to very broken input-line 
behavior.

I don't think konsole can offer any usable solutions in this area.

Cheers,
Waldo
Comment 3 dpavlotzky 2003-08-08 14:32:00 UTC
Is there an LF or CR or other string termination at the end of every line or just at the 
"real" end of the line. Maybe it's possible to search for that? 
 
kind regards, 
 
David Pavlotzky 
Comment 4 Thiago Macieira 2003-08-08 14:40:19 UTC
The current code already knows about premature end of lines (just try selecting with 
mouse a line that ended by a newline past the newline). Maybe then all that is needed is a 
button "Show buffer in not wordwrapped" and Konsole would show the user a re-rendering 
of the buffer contents. 
Comment 5 dpavlotzky 2003-08-08 14:52:42 UTC
That would be great! 
 
I was just thinking about an example: nano. You can start it with the "-w" switch to have 
nano not wrap long lines. Instead it shows a "$" at the end of the (terminal) line and 
when you go to the $ the line is shifted. 
 
kind regards, 
 
David Pavlotzky 
Comment 6 Stephan Kulow 2003-08-08 15:53:33 UTC
Subject: Re:  disable wordwrap in konsole

On Friday 08 August 2003 14:52, david@djin.com wrote:
> I was just thinking about an example: nano. You can start it with the "-w" switch to have 
> nano not wrap long lines. Instead it shows a "$" at the end of the (terminal) line and 
> when you go to the $ the line is shifted. 
nano is an editor no terminal emulator, no?

Greetings, Stephan

Comment 7 dpavlotzky 2003-08-08 16:36:00 UTC
Correct 
 
kind regards, 
 
David Pavlotzky 
Comment 8 Thiago Macieira 2003-08-11 23:43:12 UTC
*** Bug 62509 has been marked as a duplicate of this bug. ***
Comment 9 Amit Gollapudi 2003-08-11 23:52:15 UTC
Like I mentioned in bug report# 62509, the way emacs handles wrapping of long
lines in a shell is ideal.  A similar mechanism is used to OS X terminals.  So,
the line would still be layed out based on available space and wrapped normally.
 However, when the terminal is resized, more and more of the text would move
into a single line based on available space.  This behavior is kind of similar
to text editors/viewers.
Comment 10 dpavlotzky 2003-09-10 23:59:16 UTC
Hi,

PuTTY (www.chiark.greenend.org.uk/~sgtatham/putty/) has the possibility to 
turn word wrapping of.

When starting a new session goto Terminal in the tree view on the left. Here 
you have an option "Auto wrap mode initialy on". When you disable this option 
long lines het truncated at the end of the PuTTY window.

I couldn't find an option to add a horizontal scrollbar though.

Kind regards,

David Pavlotzky
Comment 11 Thiago Macieira 2003-11-04 03:38:55 UTC
*** Bug 67157 has been marked as a duplicate of this bug. ***
Comment 12 Pedro Mullor 2003-11-04 20:42:12 UTC
Hello all,

apparently I opened a dupe yesterday :P

As I told, "There should be a sort of 'buffer', which stores horizontal data.
I use everyday 'cmd' from windows and, besides its poor terminal emulation, it's the only terminal around which I know has this 'buffer' feature.

You just do a select of this sort and use the horizontal bar to pan through the 'buffered data', it works nice (sometimes it gots the CPU at 100 because it moves the focus of the terminal window while drawing on it - as a typewriter - but this is another thing... ;o) "

CMD sets a limit of, say, 80 columns for normal operation but when I start sqlplus and I make 'set line 3000' to sort data at its widest, it just gets the job done.

I would admit the terminal emulation of CMD is not the brightest but it performs this feature with no problem.

I've tried PowerTerm, putty & CRT to no avail.... :|

Kind regards,

Pedro Mullor
Comment 13 Pedro Mullor 2004-02-08 18:12:00 UTC
could we have a sort of confirmation of deny.
As long as 3.2 went out recently, it would be great news to see this is foreseen someday soon....

thanks ,

Pedro
Comment 14 Pedro Mullor 2004-02-08 18:13:17 UTC
sorry, it was "confirmation OR deny" :P

BTW, hello everyone.

Pedro
Comment 15 Waldo Bastian 2004-02-09 00:10:38 UTC
Yes, it would be nice to have. No, I'm not going to implement it anytime soon. Maybe someone else will though, you never know. I will be more than happy to assist anyone that wants to work on this.
Comment 16 Alparslan Ozturk 2006-01-10 15:02:31 UTC
hi,

I'm using kde 3.5, I also want a horizontal scrollbar.
I think, must be differrent "Screen buffer size" and "window size"

thanks
Comment 17 Marcel Partap 2006-08-16 22:45:24 UTC
*** This bug has been confirmed by popular vote. ***
Comment 18 Robert Knight 2006-08-16 22:57:26 UTC
It is now at least possible to add this since lines are now allowed to be longer than the number of columns in the display (this was needed to fix the bug where making the display smaller and then larger again would lose some of the output which was originall visible).

This would have the side effect of making the end of a long prompt disappear off the screen though (at least when using Bash, I'm not sure how other shells handle their prompt-lines).
Comment 19 shattered 2006-10-28 15:08:30 UTC
In the meantime, you could use screen(1)...
Comment 20 Juergen Schwarz 2007-05-30 18:02:31 UTC
>> In the meantime, you could use screen(1)... 
I've been using screen(1), but don't know how to achive horizontal scroll.
Anybody able to explain how ??
Comment 21 Rob Hasselbaum 2007-11-09 20:47:13 UTC
Is this being worked on for KDE4? I love Konsole, but this is a big limitation compared to other tools.
Comment 22 Maciej Pilichowski 2007-12-16 10:07:50 UTC
My vote for it.

However few issues -- the wordwrap should be switched on the fly, i.e. user should be able to turn it on an work in MC for example, then quit it, run mysql client, disable wordwrap so each line should now become one line indeed.
But if any program asks, in wordwrap mode, about console width the answer should be given according to the window size (or settings).
So if any program does wordwprapping by itself Konsole should not "fix" it.
Comment 23 Robert Knight 2008-01-04 00:26:31 UTC
*** Bug 117152 has been marked as a duplicate of this bug. ***
Comment 24 Robert Knight 2008-03-24 15:05:20 UTC
Created attachment 24036 [details]
Add 'Enable Word Wrap' option - V1

Adds facility to turn line wrapping on or off via View -> Enable Word Wrap
Comment 25 Robert Knight 2008-03-24 15:17:54 UTC
The patch in comment #24 is a first attempt at this.  It adds an 'Enable Word Wrap' option on the View menu which can be unchecked to disable word wrapping.  The text layout is redone when turning word wrap on or off.  A horizontal scrollbar appears when word wrapping is turned off.  The scrollbar range is currently much larger than it should be.

It works quite well for text which is produced by a simple program such as 'cat' which just writes output without treating the terminal specially.  With word-wrapping alone, interactive programs such as bash had odd problems such as rewriting the current line instead of moving to a new line when entering long command-lines.

eg:

endofcommand bashprompt$ startofcommand-

To fix this the current implementation tells the terminal than the width is some arbitrary large value (>1000) when word wrapping is disabled.  Which is infinite for most purposes.  Programs such as Vim which display information at the right-edge of the screen can do odd things as a result.  

>  However, when the terminal is resized, more and more of the
> text would move into a single line based on available space.

That seems like the best option.  Terminal output can be very, very long - much larger than a text file would usually be.  Reformatting might be somewhat slow in such cases.  

Incidentally - as a temporary solution you can save the output from Konsole to a text file via Scrollback -> Save Output and then open it in any text editor which supports word-wrap off.  The Save Output dialog also provides an option to save the output in HTML if you want to preserve formatting information.
Comment 26 Kurt Hindenburg 2009-03-14 07:00:25 UTC
Created attachment 32094 [details]
Patch to remove wordwrap

I had to do a lot of manually editing but this patch will apply to 4.2 and to trunk.
There are some issues still, 1 is the vertical scrollbar position.
Comment 27 Marius Bjørnstad 2010-11-11 13:09:17 UTC
Hi, How can I enable this patch in Konsole 2.5 / KDE 4.5.1 ?

A lot of the bugs/wishes that are marked as duplicates of this one request a subtly different feature: that the terminal buffers long lines, but does word wrap(line wrap) as normal. When the terminal is resized, the terminal would re-flow the text, so that the whole (new) width is used for long lines in the existing output. Examples with this functionality are rxvt and the Mac terminal (the only thing i envy about my co-worker's mac).
Comment 28 Kurt Hindenburg 2012-06-19 02:57:06 UTC
Is there still any interest in this?
Comment 29 Rob Hasselbaum 2012-06-20 13:29:14 UTC
Yes.
Comment 30 Juergen Schwarz 2012-06-25 11:36:02 UTC
Yes, definitely.
Comment 31 Emil Sedgh 2012-07-24 10:11:15 UTC
I would love to have this feature as well.
Comment 32 Marian Kyral 2012-08-05 18:51:00 UTC
Me too.
Comment 33 Paul McAuley 2013-04-03 12:11:17 UTC
It would be good if bug 196998 could be implemented in conjunction with this.
Comment 34 Juergen Schwarz 2013-04-03 15:03:58 UTC
Yes, it should be implemented the way described by Paul in bug 196998 comment 11 (can I link to another bug's comment this way ?).
Comment 35 Christoph Feck 2018-08-19 05:09:13 UTC
*** Bug 397597 has been marked as a duplicate of this bug. ***
Comment 36 cat22 2018-08-19 06:53:36 UTC
This bug was filed in 2003 it is now 2018. 15 years!
Can someone either confirm this bug is going to be addressed or else plainly state it wont be fixed and why?
BTW - there is a w/o people can use but its clumsy:
alias wrapoff='echo -e "\\e[?7l"'
alias wrapon='echo -e "\\e[?7h"'
Its clumsy because it only affects future text it will not unwrap existing text.
I'm mystified why there is such strong reluctance to address this issue.
Comment 37 Egmont Koblinger 2018-08-19 17:38:57 UTC
You might want to see https://bugzilla.gnome.org/show_bug.cgi?id=769440 why gnome-terminal rejected this idea, and xterm.js followed too: https://github.com/xtermjs/xterm.js/issues/1617.

> alias wrapoff='echo -e "\\e[?7l"'

This causes characters to be chopped off permanently, hardly unlikely to be what anyone is looking for.
Comment 38 Nate Graham 2018-08-19 18:13:00 UTC
I concur; I'm not sure this would actually be useful.

Instead, what might make more sense is to implement dynamic wrapping properly: Bug 196998
Comment 39 tcanabrava 2023-09-03 22:31:04 UTC
Created attachment 161394 [details]
attachment-352116-0.html

There’s an option for that if you do t like word wrap. I’m on the phone now
so it’s hard to remember where, but it’s there.

On Sun, 3 Sep 2023 at 17:30 Kenneth Perry <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=62380
>
> Kenneth Perry <thothonegan@gmail.com> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |thothonegan@gmail.com
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 40 Kurt Hindenburg 2024-03-24 01:56:06 UTC
Let us know if this is still an issue in recent versions.
Comment 41 `{third: "Beedell", first: "Roke"}`{.JSON5} 2024-03-24 02:38:26 UTC
(In reply to Kurt Hindenburg from comment #40)

Per https://imgur.com/Ec2VlVr, I still don't see any way to disable word wrap in https://download.opensuse.org/repositories/openSUSE:/Factory/standard/x86_64/konsole-24.02.1-1.1.x86_64.rpm, so it remains an issue for me.
Comment 42 cat22 2024-03-29 12:08:35 UTC
There doesn't appear to have any horizontal scrollbar (or an way to enable one)  in konsole 24.02.0
If I have missed the option somehow please slap me and tell me where it is.
Comment 43 Bug Janitor Service 2024-04-13 03:47:55 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!