[Konsole-devel] [Bug 62380] disable wordwrap in konsole

Robert Knight robertknight at gmail.com
Mon Mar 24 14:17:55 UTC 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=62380         
robertknight gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|konsole-devel kde org       |robertknight gmail com
             Status|NEW                         |ASSIGNED



------- Additional Comments From robertknight gmail com  2008-03-24 15:17 -------
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.



More information about the konsole-devel mailing list