eraserhd / kak-ansi

Kakoune support for rendering ANSI-colored text.
https://github.com/eraserhd/kak-ansi
The Unlicense
39 stars 4 forks source link

ansi-filter truncates files with unexpected/invalid character encoding #10

Open krobelus opened 2 years ago

krobelus commented 2 years ago

If I run kak < repro.txt it only reads 420 lines, even though the file has 4000 lines.

repro.txt

It looks like there is a race where both the new input and the |%opt{ansi_filter} want to update the buffer. Probably a bug in Kakoune?

Ok this just because the file contained invalid UTF-8. Will try to work on a fix, or at least print a warning.