-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Erratic output when OSC8 sequences are present #2541
Comments
related: #2158 |
More specifically, the test ensures that OSC sequences don't end up wrapping the line.
More specifically, the test ensures that OSC sequences don't end up wrapping the line.
More specifically, the test ensures that OSC sequences don't end up wrapping the line.
More specifically, the test ensures that OSC sequences don't end up wrapping the line.
Whoops. Sorry for the spam! Rebasing and force pushing will do that, I guess. 😅 Anyways... this is more along the lines of what you expected, right? New behaviour from my branch is on the left, old behaviour is on the right. Unfortunately this comes with the drawback where the link is treated as two separate hyperlinks, rather than as a single one. I don't think we're able to fix that, though, since it's the job of the terminal emulator to render the link decorations. |
Wow I was typing in my phone and accidentally closed! |
Yep that looks right!
You can put an id as part of the osc8 string to link two separate lines as the same link.
Thanks! |
Neat! Mind if I fix that in a future PR? This one [edit: meaning #2544] is getting pretty long as-is, and I have some finals to study for :) |
Don't mind at all! |
More specifically, the test ensures that OSC sequences don't end up wrapping the line.
More specifically, the test ensures that OSC sequences don't end up wrapping the line.
More specifically, the test ensures that OSC sequences don't end up wrapping the line.
With #2544 merged, this should be fixed in the next release. 🎉 |
Hello -
When bat displays something that already includes an OSC8 sequence, it has erratic output, dependent on the terminal-width. Seemingly, OSC8 ids and urls are included in line-wrapping which leads to strange output depending on where the line is cut.
What steps will reproduce the bug?
Works as expected:
Includes escape characters in output:
No escape characters, but incorrect wrapping:
What happens?
If you keep changing the terminal width, strange things keep happening.
What did you expect to happen instead?
The output should be the same in all above scenarios, as long as
terminal-width
is greater than the length of the printable section of an OSC8 sequence ("This is a link") in this case.How did you install
bat
?bat version and environment
Software version
bat 0.23.0 (871abd2)
Operating system
Linux 6.2.10-arch1-1
Command-line
Environment variables
System Config file
Could not read contents of '/etc/bat/config': No such file or directory (os error 2).
Config file
Could not read contents of '/home/tim/.config/bat/config': No such file or directory (os error 2).
Custom assets metadata
Could not read contents of '/home/tim/.cache/bat/metadata.yaml': No such file or directory (os error 2).
Custom assets
'/home/tim/.cache/bat' not found
Compile time information
Less version
The text was updated successfully, but these errors were encountered: