[Konsole-devel] [konsole] [Bug 196998] Konsole should reflow the text when resizing

Egmont Koblinger egmont at gmail.com
Wed Sep 11 16:20:42 UTC 2013


https://bugs.kde.org/show_bug.cgi?id=196998

--- Comment #13 from Egmont Koblinger <egmont at gmail.com> ---
Just FYI: I'm currently implementing this feature in VTE (gnome-terminal and
friends). I'd be glad if anyone interested in this feature could give it a try
with their favorite applications, so that we can all benefit from our shared
experiences (e.g. I'd be curious to hear about applications that this feature
breaks, if any). See the patch at
https://bugzilla.gnome.org/show_bug.cgi?id=336238

Half of the patch is the rewrapping code. I didn't touch the scrollback's
internals, what I'm doing is I'm building up a brand new scrollback buffer with
the new width and then throw away the old one. This is far from ideal: it uses
double memory during its operation, and is also a bit slow as it individually
copies all the cells (although <1s wall clock time on an average laptop for an
insanely large scrollback buffer of 100'000 lines is okay I think). One day the
internals of the scrollback buffer can be re-written so that it's more
convenient and faster to rewrap (no copying of cells, just adjusting pointers
to lines, or something like this). The only essential pre-requisite I'm
building on is that for each terminal row, VTE already keeps the information
whether it was terminated with a soft wrap (overflow to next line) or hard wrap
(explicit newline).

The other, boring but important half of my patch is to figure out the desired
offsets (scroll position and such) after the resize.

I hope my work gives you new inspiration on implementing this great feature in
Konsole, too :)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list