Issue: Document::ConvertLineEnds() uses a fixed length calculated at the start of the iteration. Because the document grows when inserting CRLF characters, the loop terminates before reaching the new end of the document. This leaves trailing line endings unconverted (e.g., remaining as LF when converting to CRLF).
I think simplest fix is just using
complex fix is update
length = LengthNoExcept();at end ofDeleteChars()/InsertString()block.For complex update a
--length;resp++length;at end ofDeleteChars() /InsertString()block would work too, since delete/insert char length is 1.pos < LengthNoExcept()is more elegant and comparable fast.This was a regression in [0cf8bf].
Committed fix with [614b4c],
Related
Commit: [0cf8bf]
Commit: [614b4c]