[bugs:#2501] Document::ConvertLineEnds() does not convert all line-ends
Status: open
Group: Bug
Created: Mon Mar 09, 2026 11:05 PM UTC by Rainer Kottenhoff
Last Updated: Mon Mar 09, 2026 11:05 PM UTC
Owner: nobody
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).
Sent from sourceforge.net because scintill...@googlegroups.com is subscribed to https://sourceforge.net/p/scintilla/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/scintilla/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
[bugs:#2501] Document::ConvertLineEnds() does not convert all line-ends
Status: open
Group: Bug
Labels: Scintilla EOL
Created: Mon Mar 09, 2026 11:05 PM UTC by Rainer Kottenhoff
Last Updated: Mon Mar 09, 2026 11:05 PM UTC
Owner: nobody
I think simplest fix is just using
for (Sci::Position pos = 0; pos < LengthNoExcept(); pos++)
complex fix is update length = LengthNoExcept(); at end of DeleteChars() / InsertString() block.
[bugs:#2501] Document::ConvertLineEnds() does not convert all line-ends
Status: open
Group: Bug
Labels: Scintilla EOL
Created: Mon Mar 09, 2026 11:05 PM UTC by Rainer Kottenhoff
Last Updated: Mon Mar 09, 2026 11:50 PM UTC
Owner: nobody