Unable to open files with windows newline (\r\n)
vojta7 opened this issue · comments
Describe the bug
Ox freezes when on start when trying to open files with windows newlines and uses 100% of single CPU core. Nothing is rendered to the screen.
To Reproduce
Steps to reproduce the behavior:
- Start ox with a file with windows newlines as the only argument:
ox file.txt
Expected behavior
I expect ox to open the file with windows newlines and give me some visual hint that there are unprintable characters/windows newlines.
Aditional info
It seems that ox is stuck inside this loop, ch is '\r' so UnicodeWidthStr::width(*ch) returns 0, so there is nothing to break or advance this loop.
Desktop (please complete the following information):
- OS: Arch Linux (x86_64)
I've already added support for this in 0.2.7 which is taking longer than I expected to produce.
Sorry, I missed the 0.2.7 branch. And thank you for this software 👍