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

Rainer Kottenhoff

unread,
Mar 10, 2026, 6:17:13 AMMar 10
to scintill...@googlegroups.com

For complex update a --length; resp ++length; at end of DeleteChars() / InsertString() block would work too, since delete/insert char length is 1.
pos < LengthNoExcept() is more elegant and comparable fast.


[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: Tue Mar 10, 2026 12:30 AM UTC
Owner: nobody

Neil Hodgson

unread,
Mar 10, 2026, 6:49:37 PMMar 10
to scintill...@googlegroups.com
  • status: open --> open-fixed
  • Comment:

This was a regression in [0cf8bf].

Committed fix with [614b4c],


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

Status: open-fixed


Group: Bug
Labels: Scintilla EOL

Created: Mon Mar 09, 2026 11:05 PM UTC by Rainer Kottenhoff

Last Updated: Tue Mar 10, 2026 10:17 AM UTC
Owner: nobody

Neil Hodgson

unread,
Mar 25, 2026, 6:51:31 PM (11 days ago) Mar 25
to scintill...@googlegroups.com
  • status: open-fixed --> closed-fixed

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

Status: closed-fixed


Group: Bug
Labels: Scintilla EOL

Created: Mon Mar 09, 2026 11:05 PM UTC by Rainer Kottenhoff

Last Updated: Tue Mar 10, 2026 10:49 PM UTC
Owner: nobody

Reply all
Reply to author
Forward
0 new messages