-
Notifications
You must be signed in to change notification settings - Fork 332
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
lf can't preview long line strings #1446
Comments
This actually doesn't have anything to do with The reason this happens is because
|
I was wondering if it might be possible to consider an alternative approach. Instead of terminating the preview when a line exceeds the buffer size, perhaps |
I agree that lines should be displayed even if they exceed the buffer length. Actually in this case there's no point in displaying any message since the preview window can only fit about 100 characters anyway, and you won't notice the difference. Would you be able to try out the branch in https://github.com/joelim-work/lf/tree/preview-long-lines and see if it works for you? If it does then I might submit it as a PR. |
I’ve tested the branch at https://github.com/joelim-work/lf/tree/preview-long-lines and I am content with the behaviour now. It works well and I agree there’s no need for a truncation message. Thank you for your efforts in addressing this issue. |
Thanks, I have submitted PR #1447 |
Hello,
I’ve encountered an issue where lf fails to display a line generated by a preview program when the line length reaches or exceeds 65536 characters. This issue is particularly noticeable when previewing compact JSON files.
To clarify, this seems to be an issue with
lf
, not thebat
command used in the preview program. I’ve tested thebat --color=always -pp -- longline.txt
command directly in the terminal, and it works fine. The long line is printed without any issues.Version: 31
Operating System: Arch Linux
Installation Method: I installed lf using the command
sudo pacman -S lf
.Steps to Reproduce:
bat --color=always -pp -- your_file
.Expected Behavior: lf should be able to display long line strings generated by a preview program, regardless of their length.
Actual Behavior: lf fails to display any line that contains 65536 characters or more.
The text was updated successfully, but these errors were encountered: