diff --git a/Src/CompareEngines/Wrap_DiffUtils.cpp b/Src/CompareEngines/Wrap_DiffUtils.cpp index be9b6c4cc7c..4ab3b1a5b8b 100644 --- a/Src/CompareEngines/Wrap_DiffUtils.cpp +++ b/Src/CompareEngines/Wrap_DiffUtils.cpp @@ -51,7 +51,7 @@ void DiffUtils::SetCompareOptions(const CompareOptions& options) { DIFFOPTIONS doptions; static_cast(options).GetAsDiffOptions(doptions); - m_pDiffWrapper->SetOptions(&doptions); + m_pDiffWrapper->SetOptions(&doptions, true); } /** diff --git a/Src/DiffWrapper.cpp b/Src/DiffWrapper.cpp index 3345d80f209..beccdb789b2 100644 --- a/Src/DiffWrapper.cpp +++ b/Src/DiffWrapper.cpp @@ -141,11 +141,13 @@ void CDiffWrapper::GetOptions(DIFFOPTIONS *options) const * internally and stores them. * @param [in] options Pointer to structure having new options. */ -void CDiffWrapper::SetOptions(const DIFFOPTIONS *options) +void CDiffWrapper::SetOptions(const DIFFOPTIONS *options, bool setToDiffutils) { assert(options != nullptr); m_options.SetFromDiffOptions(*options); m_xdlFlags = make_xdl_flags(m_options); + if (setToDiffutils) + m_options.SetToDiffUtils(); } void CDiffWrapper::SetPrediffer(const PrediffingInfo * prediffer /*= nullptr*/) diff --git a/Src/DiffWrapper.h b/Src/DiffWrapper.h index 4cc9914da0d..ab168edd589 100644 --- a/Src/DiffWrapper.h +++ b/Src/DiffWrapper.h @@ -164,7 +164,7 @@ class CDiffWrapper void SetCreateDiffList(DiffList *diffList); void GetOptions(DIFFOPTIONS *options) const; const DiffutilsOptions& GetOptions() const { return m_options; } - void SetOptions(const DIFFOPTIONS *options); + void SetOptions(const DIFFOPTIONS *options, bool setToDiffutils = false); void SetTextForAutomaticPrediff(const String &text); void SetPrediffer(const PrediffingInfo * prediffer = nullptr); void GetPrediffer(PrediffingInfo * prediffer) const; diff --git a/Src/FolderCmp.cpp b/Src/FolderCmp.cpp index 1bbe4c1ecd4..11ec978192f 100644 --- a/Src/FolderCmp.cpp +++ b/Src/FolderCmp.cpp @@ -256,7 +256,7 @@ int FolderCmp::prepAndCompareFiles(DIFFITEM &di) diffList.Clear(); dw.SetCompareFiles(tFiles); - dw.SetOptions(m_pCtxt->GetOptions()); + dw.SetOptions(m_pCtxt->GetOptions(), true); dw.SetFilterList(m_pCtxt->m_pFilterList); dw.SetSubstitutionList(m_pCtxt->m_pSubstitutionList); dw.SetFilterCommentsSourceDef(Ext);