diff options
| author | Zufu Liu <unknown> | 2026-03-11 09:23:34 +1100 |
|---|---|---|
| committer | Zufu Liu <unknown> | 2026-03-11 09:23:34 +1100 |
| commit | 3f1838d9feb6b8348a24b6ba4a17c2c40e3541c6 (patch) | |
| tree | 937de3679ec1bb7ffda87e4ad2d82c1ed32a2b49 | |
| parent | 08f3ce9f150063e4c0616db437ceef01e17679fe (diff) | |
| download | scintilla-mirror-3f1838d9feb6b8348a24b6ba4a17c2c40e3541c6.tar.gz | |
Bug [#2501]. Fix regression in SCI_CONVERTEOLS that may not convert whole file.
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | src/Document.cxx | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 470fc64aa..23aa597a3 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -612,6 +612,10 @@ Improve mouse drag behaviour when drag and drop disabled. <a href="https://sourceforge.net/p/scintilla/feature-requests/1581/">Feature #1581</a>. </li> + <li> + Fix regression in SCI_CONVERTEOLS that may not convert whole file. + <a href="https://sourceforge.net/p/scintilla/bugs/2501/">Bug #2501</a>. + </li> </ul> <h3> <a href="https://www.scintilla.org/scintilla560.zip">Release 5.6.0</a> diff --git a/src/Document.cxx b/src/Document.cxx index 4fb266730..ab4da0179 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1907,8 +1907,7 @@ std::string Document::TransformLineEnds(const char *s, size_t len, EndOfLine eol void Document::ConvertLineEnds(EndOfLine eolModeSet) { UndoGroup ug(this); - const Sci::Position length = Length(); - for (Sci::Position pos = 0; pos < length; pos++) { + for (Sci::Position pos = 0; pos < LengthNoExcept(); pos++) { const char ch = cb.CharAt(pos); if (ch == '\r') { if (cb.CharAt(pos + 1) == '\n') { |
