From d2867d8263cc9ba3b800063eca730f307cf07c3e Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Sun, 21 Jul 2019 17:53:54 +0200 Subject: [PATCH] + fix: obsolete newline after .ini-file sections with comments --- Versions/build.txt | 2 +- res/Notepad3.exe.manifest.conf | 2 +- src/Config/SimpleIni.h | 6 ++++-- src/VersionEx.h | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Versions/build.txt b/Versions/build.txt index 44085c505..65b7a7f80 100644 --- a/Versions/build.txt +++ b/Versions/build.txt @@ -1 +1 @@ -2401 +2402 diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf index 0877fa6d9..d99e16b9f 100644 --- a/res/Notepad3.exe.manifest.conf +++ b/res/Notepad3.exe.manifest.conf @@ -3,7 +3,7 @@ Notepad3 BETA diff --git a/src/Config/SimpleIni.h b/src/Config/SimpleIni.h index 9a14b0cde..77897aad7 100644 --- a/src/Config/SimpleIni.h +++ b/src/Config/SimpleIni.h @@ -2557,8 +2557,10 @@ CSimpleIniTempl::Save( for ( ; iValue != oValues.end(); ++iValue) { // write out the comment if there is one if (iValue->pComment) { - a_oOutput.Write(SI_NEWLINE_A); - bNeedNewLine = false; + if (bNeedNewLine) { + a_oOutput.Write(SI_NEWLINE_A); + bNeedNewLine = false; + } if (!OutputMultiLineText(a_oOutput, convert, iValue->pComment)) { return SI_FAIL; } diff --git a/src/VersionEx.h b/src/VersionEx.h index 5032bb75d..10b726167 100644 --- a/src/VersionEx.h +++ b/src/VersionEx.h @@ -8,7 +8,7 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 19 #define VERSION_REV 721 -#define VERSION_BUILD 2401 +#define VERSION_BUILD 2402 #define SCINTILLA_VER 420 #define ONIGURUMA_REGEX_VER 6.9.3 #define VERSION_PATCH BETA