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.