Skip to content

Commit

Permalink
Add PreviewMarkdown plugin (#1641) (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdottaka committed Jan 9, 2023
1 parent 20b25ca commit f87736e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Src/MainFrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,14 +772,16 @@ bool CMainFrame::ShowAutoMergeDoc(UINT nID, CDirDoc * pDirDoc,
return false;

String unpackedFileExtension;
if (infoUnpacker && GetOptionsMgr()->GetBool(OPT_PLUGINS_ENABLED))
if ((infoUnpacker || FileTransform::AutoUnpacking) && GetOptionsMgr()->GetBool(OPT_PLUGINS_ENABLED))
{
std::vector<String> filepaths(nFiles);
std::transform(ifileloc, ifileloc + nFiles, filepaths.begin(),
[](auto& file) { return file.filepath; });
String filteredFilenames = strutils::join(filepaths.begin(), filepaths.end(), _T("|"));
int preferredWindowType = -1;
unpackedFileExtension = infoUnpacker->GetUnpackedFileExtension(filteredFilenames, preferredWindowType);
PackingInfo infoUnpacker2;
unpackedFileExtension = (infoUnpacker ? infoUnpacker : &infoUnpacker2)
->GetUnpackedFileExtension(filteredFilenames, preferredWindowType);
if (static_cast<int>(nID) <= 0 && preferredWindowType >= 0)
nID = ID_MERGE_COMPARE_TEXT + preferredWindowType;
}
Expand Down

0 comments on commit f87736e

Please sign in to comment.