-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long URLs not wrapped #434
Comments
Also, we can maybe look at finding URLs ourselves and using hyperlink escapes to |
I think it should be as simple as rendering them as a hyperlink. |
After some more investigation, no, this won't work. Not all terminals support it. Indeed neither xterm nor xfce4-terminal support it. tmux also swallows the hyperlink escapes - even if the "outer" terminal supports hyperlink. |
I think as a baseline, copy+paste must work, even if it means that "smart" terminal rendering of http links breaks for wrapped URIs. |
Yeah fair enough. I guess due to the problem that it only sometimes works, tools like |
Describe the bug
When viewing a URL in the pager, if it is too wide it gets clipped, not wrapped.
I suppose this is a general issue with long "words", but it is unlikely to arise in ordinary text
(even in German!) But long URLs are common. So we need to handle this better.
To Reproduce
Read a mail that contains a URL wider than the terminal.
Expected behavior
URL should be wrapped, with the following expectations:
The URL text, when copied, does not include any extra spaces or other characters.
The whole display does not get corrupted in any way in the presence of long, wrapped URLs/words.
Ideally, when using a terminal that generates hyperlinks for URLs rendered therein, the wrapping should
not break the link. That is, the hyperlink target should be the whole URL.
Additional context
An alternative approach, and one I have occasionally wished for in Mutt, is to automatically rewrite long links to a shortened URL, pointing to a local (perhaps ephemeral) HTTP server that can direct the client. For example, rewrite
https://REALLY_LONG
tohttp://localhost/SHORT
that serves up a 301 pointing to the former.For now, it is enough to ensure that copy/paste works.
The text was updated successfully, but these errors were encountered: