Skip to content

Commit

Permalink
Fix issue #2080: Ignoring carriage return differences doesn't work an…
Browse files Browse the repository at this point in the history
…ymore
  • Loading branch information
sdottaka committed Nov 2, 2023
1 parent a656175 commit e1709e5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Src/CompareEngines/Wrap_DiffUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void DiffUtils::SetCompareOptions(const CompareOptions& options)
{
DIFFOPTIONS doptions;
static_cast<const DiffutilsOptions&>(options).GetAsDiffOptions(doptions);
m_pDiffWrapper->SetOptions(&doptions);
m_pDiffWrapper->SetOptions(&doptions, true);
}

/**
Expand Down
4 changes: 3 additions & 1 deletion Src/DiffWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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*/)
Expand Down
2 changes: 1 addition & 1 deletion Src/DiffWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Src/FolderCmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e1709e5

Please sign in to comment.