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

Fix preview for files containing long lines #1447

Merged
merged 4 commits into from
Oct 22, 2023
Merged

Fix preview for files containing long lines #1447

merged 4 commits into from
Oct 22, 2023

Conversation

joelim-work
Copy link
Collaborator

When previewing files, reading the contents line by line using bufio.Scanner fails if a line is too long and cannot fit in the internal buffer. This PR changes the code to use bufio.Reader.ReadLine instead which is able to filter out the excess content for each line.

@gokcehan
Copy link
Owner

@joelim-work Looks good, thanks for the patch.

@gokcehan gokcehan merged commit 154d718 into gokcehan:master Oct 22, 2023
4 checks passed
@joelim-work joelim-work deleted the preview-long-lines branch October 22, 2023 23:37
@gokcehan gokcehan mentioned this pull request Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lf can't preview long line strings
2 participants