[scintilla:bugs] #2501 Document::ConvertLineEnds() does not convert all line-ends

0 views
Skip to first unread message

Rainer Kottenhoff

unread,
Mar 9, 2026, 7:05:30 PM (7 hours ago) Mar 9
to scintill...@googlegroups.com

[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.

Zufu Liu

unread,
Mar 9, 2026, 7:50:58 PM (6 hours ago) Mar 9
to scintill...@googlegroups.com
  • labels: --> Scintilla, EOL

[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

Zufu Liu

unread,
Mar 9, 2026, 8:30:30 PM (6 hours ago) Mar 9
to scintill...@googlegroups.com

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

Reply all
Reply to author
Forward
0 new messages