Fix copied paths repeated for "Copy Selected Pathname(s)" in Search results

Fix: https://community.notepad-plus-plus.org/topic/26388/notepad-v8-7-2-release-candidate/11?_=1732379132698

Fixed by: af2b90f0a5 (r149445528)
This commit is contained in:
Don Ho 2024-11-23 17:50:06 +01:00
parent 09332d6f98
commit 7af3c104d5
1 changed files with 6 additions and 3 deletions

View File

@ -719,14 +719,17 @@ vector<wstring> 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;
}