You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was modifying glamour to output links without the anchor text, but this uses up "space" in wordwrap.go even though it ideally would know that the anchor text does not get displayed by the terminal.
Here's a printf example that you can use to see what the link output looks like:
$ printf '\e]8;;file:./SECURITY.md\e\\This is a link\e]8;;\e\\\n'
So the bytes from file:./SECURITY.md should not be counted towards the block's wordwrapping. Here's an example of how it fails to look correct:
$ ./glow ~/projects/kitty/CONTRIBUTING.md
### Reporting bugs
Please first search existing bug reports (especially closed ones) for a report that matches your
issue.
When reporting a bug, provide full details of your environment, that means, at a minimum, kitty
version, OS and OS version, kitty config (ideally a minimal config to reproduce the issue with).
### Contributing code
Install the dependencies using your favorite
package manager. Build and run kitty from source.
Make a fork, submit your Pull Request. If it's a large/controversial change, open an issue
beforehand to discuss it, so that you don't waste your time making a pull request that gets
rejected.
If the code you are submitting is reasonably easily testable, please contribute tests as well (see
the kitty_tests/ sub-directory for existing tests, which can be run with ./test.py ).
That's it.
Note how the middle paragraph that contains a link for "the dependencies" and a link for "from source" cause the paragraph to be badly wrapped, the same as if the URL was inline:
$ glow ~/projects/kitty/CONTRIBUTING.md
### Reporting bugs
Please first search existing bug reports (especially closed ones) for a report that matches your
issue.
When reporting a bug, provide full details of your environment, that means, at a minimum, kitty
version, OS and OS version, kitty config (ideally a minimal config to reproduce the issue with).
### Contributing code
Install the dependencies https://sw.kovidgoyal.net/kitty/build/#dependencies using your favorite
package manager. Build and run kitty from source https://sw.kovidgoyal.net/kitty/build/#install-and-
run-from-source.
Make a fork, submit your Pull Request. If it's a large/controversial change, open an issue
beforehand to discuss it, so that you don't waste your time making a pull request that gets
rejected.
If the code you are submitting is reasonably easily testable, please contribute tests as well (see
the kitty_tests/ sub-directory for existing tests, which can be run with ./test.py ).
That's it.
The text was updated successfully, but these errors were encountered:
It's even worse than this; the margin and indent code don't understand that the link anchor following the OSC escape doesn't make it to the screen, so they will wrap it (breaking the links) and indent it, too. Essentially the code would need to understand the actual rules for what's part of the escape code, which it currently does not and which seems to be implemented a few places in the codebase.
I was modifying glamour to output links without the anchor text, but this uses up "space" in wordwrap.go even though it ideally would know that the anchor text does not get displayed by the terminal.
Here's a printf example that you can use to see what the link output looks like:
So the bytes from file:./SECURITY.md should not be counted towards the block's wordwrapping. Here's an example of how it fails to look correct:
Note how the middle paragraph that contains a link for "the dependencies" and a link for "from source" cause the paragraph to be badly wrapped, the same as if the URL was inline:
The text was updated successfully, but these errors were encountered: