From e002360ed8f4ecfaebae2c8d6125b5b0b8db4813 Mon Sep 17 00:00:00 2001 From: Takashi Sawanaka Date: Mon, 15 Oct 2018 22:03:15 +0900 Subject: [PATCH] DiffTextBuffer.cpp: Last line was not saved when last line has no EOL --- Src/DiffTextBuffer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Src/DiffTextBuffer.cpp b/Src/DiffTextBuffer.cpp index 8a19955af..21fab1c24 100644 --- a/Src/DiffTextBuffer.cpp +++ b/Src/DiffTextBuffer.cpp @@ -572,8 +572,11 @@ int CDiffTextBuffer::SaveToFile (const String& pszFileName, if (line == lastRealLine || lastRealLine == -1 ) { // If original last line had no EOL, then we are done - if( !m_aLines[line].HasEol() ) + if( !m_aLines[line].HasEol() ) + { + file.WriteString(sLine); break; + } // Otherwise, add the appropriate EOL to the last line ... } -- 2.11.0