diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index 84246b11b057..ad75a4b9c2f8 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -719,14 +719,17 @@ vector Finder::getResultFilePaths(bool onlyInSelectedText) const if (line < len) found = true; // Found it } + if (found) { - wstring& path = (*_pMainFoundInfos)[line]._fullPath; // Get the path from the container - paths.push_back(path); + wstring& path = (*_pMainFoundInfos)[line]._fullPath; + if (std::find(paths.begin(), paths.end(), path) == paths.end()) + { + paths.push_back(path); + } } } - return paths; }