Bug 409994

Summary: better (link) support for TUI applications
Product: [Applications] konsole Reporter: Oswald Buddenhagen <ossi>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: wishlist    
Priority: NOR    
Version: 18.04.0   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Oswald Buddenhagen 2019-07-19 11:52:34 UTC
applications based on ncurses, slang, or other text ui toolkits take control of newlines themselves, i.e., they hard-wrap text. this has the effect that links which span multiple lines are not recognized as such.

my suggestion would be to re-join lines heuristically: if the "word" fills the whole line and the next line starts with another word character, join the two - this is relatively safe and handles properly wrapped flowed text as drawn by a mailer like mutt.


while the mechanism is different, this obviously also affects selecting/copying from the terminal.

there is another incarnation of the latter problem: an ssh public key copied from, say, mcview will contain newlines, which is often a nuisance. the problem here is that the text is _not_ properly flowed, but hard-wrapped, and contains multiple words to start with, so the above heuristic would not work.

the distorted copying is less troublesome, as the "paste destination" typically offers the possibility to re-join the lines (or will even do it automatically), so i'm mostly mentioning it only for context, but you may still want to create a spin-off task for it.
Comment 1 Oswald Buddenhagen 2021-02-20 18:20:27 UTC
btw, #379294 provides a better solution than smart heuristics, but i think we will wait a really long time until all TUI programs will support it - not sure if even one of the toolkits supports this by now, given that this doesn't fit the "the screen is a matrix of cells" concept too well.
Comment 2 Oswald Buddenhagen 2021-02-20 18:27:33 UTC
(also, some cases simply can't be expected to be covered by the OSC8 support - an url that appears in a text file that is being edited most likely won't be recognized and marked as such by the editor.)