Verified Commit cb180197 authored by Adriaan de Groot's avatar Adriaan de Groot 💬 Committed by Michael Reeves
Browse files

Do not put line feed between removed lines

If a line is removed in a merge, then there should be no
line feed before it -- that will come from a subsequent
**non**-deleted line. This avoids double-newlines when a
line is removed.

(cherry picked from commit 942325c5)

BUG:437570
FIXED-IN:1.9.3
parent 8a41ec79
Pipeline #67399 passed with stage
in 3 minutes and 58 seconds
......@@ -2682,8 +2682,11 @@ bool MergeResultWindow::saveDocument(const QString& fileName, QTextCodec* pEncod
{
const QString str = mel.getString(m_pldA, m_pldB, m_pldC);
if(line > 0) // Prepend line feed, but not for first line
if(line > 0 && !mel.isRemoved())
{
// Put line feed between lines, but not for the first line
// or between lines that have been removed (because there
// isn't a line there).
textOutStream << lineFeed;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment