Skip to content
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

Wrapped URLs fail #102

Open
agenbite opened this issue Jul 21, 2024 · 2 comments
Open

Wrapped URLs fail #102

agenbite opened this issue Jul 21, 2024 · 2 comments

Comments

@agenbite
Copy link

Hi! I have a problem with long urls that are wrapped: they become broken for the terminal emulator. I use foot, here's what happens:

cat > /tmp/test
https://a.very.long/url/that/will/be/broken/by/page/when/it/is/wrapped/due/to/being/longer/than/the/terminal/window/which/is/problematic/when/trying/to/detect/urls/with/my/terminal/emulator
CTRL-D

nvimpager -p /tmp/test

Now, assuming the url is longer than page's window, if I hit CTRL-SHIFT-U (foot binding for "URL mode"), only the first line of the URL is recognised. This only happens inside page, not in plain less. Any way I can help debug this?

In my digging, I found this, which maybe hints a path to a solution: neovim/neovim#28817

Thanks!

@lucc
Copy link
Owner

lucc commented Jul 21, 2024

If I understand the linked issue correctly you suggest that we implement such a plugin in nvimpager:

  1. parse the text for hyperlinks
  2. add extmarks with the url option to the hyperlink

And then neovim will emit the OSC-8 sequence for the terminal.

@agenbite
Copy link
Author

Indeed, I think that would solve the issue and long urls would be actionable inside nvimpager. Having said that, I have not a clear idea on how much work would that imply. But it'd be great to have that functionality, yeah! :)

Thanks for nvimpager!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants