From 5164e1fa0941dd4f8e9b0db7c8bec84c6b4536ef Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Thu, 25 Jul 2019 16:03:12 +0200 Subject: [PATCH 1/2] + cln: code cleanup --- src/SciCall.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/SciCall.h b/src/SciCall.h index a19bd58a6..94ce8e361 100644 --- a/src/SciCall.h +++ b/src/SciCall.h @@ -575,13 +575,13 @@ inline DocPos Sci_GetRangeMaxLineLength(DocLn iBeginLine, DocLn iEndLine) { inline int Sci_GetCurrentEOL_A(LPCH eol) { switch (SciCall_GetEOLMode()) { case SC_EOL_CRLF: - eol[0] = '\r'; eol[1] = '\n'; eol[2] = '\0'; + if (eol) { eol[0] = '\r'; eol[1] = '\n'; eol[2] = '\0'; } return 2; case SC_EOL_CR: - eol[0] = '\r'; eol[1] = '\0'; + if (eol) { eol[0] = '\r'; eol[1] = '\0'; } return 1; case SC_EOL_LF: - eol[0] = '\n'; eol[1] = '\0'; + if (eol) { eol[0] = '\n'; eol[1] = '\0'; } return 1; default: return 0; @@ -592,13 +592,13 @@ inline int Sci_GetCurrentEOL_A(LPCH eol) { inline int Sci_GetCurrentEOL_W(LPWCH eol) { switch (SciCall_GetEOLMode()) { case SC_EOL_CRLF: - eol[0] = L'\r'; eol[1] = L'\n'; eol[2] = L'\0'; + if (eol) { eol[0] = L'\r'; eol[1] = L'\n'; eol[2] = L'\0'; } return 2; case SC_EOL_CR: - eol[0] = L'\r'; eol[1] = L'\0'; + if (eol) { eol[0] = L'\r'; eol[1] = L'\0'; } return 1; case SC_EOL_LF: - eol[0] = L'\n'; eol[1] = L'\0'; + if (eol) { eol[0] = L'\n'; eol[1] = L'\0'; } return 1; default: return 0; From 0213be1eec2508a72ea19b057447a21aa1e2cb3d Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Mon, 29 Jul 2019 09:28:20 +0200 Subject: [PATCH 2/2] + fix: MiniPath file name extension 'Filter' config as 'LoadOrder' (not lexicographical sort) --- minipath/src/Config.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/minipath/src/Config.cpp b/minipath/src/Config.cpp index ed279053b..193b36587 100644 --- a/minipath/src/Config.cpp +++ b/minipath/src/Config.cpp @@ -336,6 +336,7 @@ extern "C" BOOL IniFileIterateSection(LPCWSTR lpFilePath, LPCWSTR lpSectionName, // get all keys in a section CSimpleIniW::TNamesDepend keyList; Ini.GetAllKeys(lpSectionName, keyList); + keyList.sort(CSimpleIniW::Entry::LoadOrder()); for (const auto& key : keyList) {