@ -703,29 +703,33 @@ vector<wstring> Finder::getResultFilePaths(bool onlyInSelectedText) const
toLine = _scintView . execute ( SCI_GETLINECOUNT ) - 1 ;
toLine = _scintView . execute ( SCI_GETLINECOUNT ) - 1 ;
}
}
size_t len = _pMainFoundInfos - > size ( ) ; // First, get the number of elements in the container
for ( size_t line = fromLine ; line < = toLine ; + + line )
for ( size_t line = fromLine ; line < = toLine ; + + line )
{
{
bool found = false ; // Was it found?
const int lineFoldLevel = _scintView . execute ( SCI_GETFOLDLEVEL , line ) & SC_FOLDLEVELNUMBERMASK ;
const int lineFoldLevel = _scintView . execute ( SCI_GETFOLDLEVEL , line ) & SC_FOLDLEVELNUMBERMASK ;
if ( lineFoldLevel = = fileHeaderLevel )
if ( lineFoldLevel = = fileHeaderLevel )
{
{
wstring lineStr = _scintView . getLine ( line ) ;
line + + ; // Move to the next line
if ( line < len )
// fileHeaderLevel line format examples:
found = true ; // Found it
// spacespaceD:\folder\file.ext (2 hits)
}
// spacespacenew 1 (1 hit)
else if ( lineFoldLevel = = resultLevel )
const size_t startIndex = 2 ; // for number of leading spaces
{
auto endIndex = lineStr . find_last_of ( L ' ( ' ) ;
if ( line < len )
- - endIndex ; // adjust for space in front of (
found = true ; // Found it
wstring path = lineStr . substr ( startIndex , endIndex - startIndex ) ;
}
if ( found )
// make sure that path is not already in before adding
{
if ( std : : find ( paths . begin ( ) , paths . end ( ) , path ) = = paths . end ( ) )
wstring & path = ( * _pMainFoundInfos ) [ line ] . _fullPath ; // Get the path from the container
if ( path . find ( ' \\ ' ) ! = std : : wstring : : npos & & std : : find ( paths . begin ( ) , paths . end ( ) , path ) = = paths . end ( ) ) // Contains a path separator and does not exist in the container
{
{
paths . push_back ( path ) ;
paths . push_back ( path ) ;
}
}
}
}
}
}
return paths ;
return paths ;
}
}
@ -5736,12 +5740,12 @@ intptr_t CALLBACK Finder::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam
wstring copyLines = pNativeSpeaker - > getLocalizedStrFromID ( " finder-copy " , L " Copy Selected Line(s) " ) ;
wstring copyLines = pNativeSpeaker - > getLocalizedStrFromID ( " finder-copy " , L " Copy Selected Line(s) " ) ;
wstring copyVerbatim = pNativeSpeaker - > getNativeLangMenuString ( IDM_EDIT_COPY , L " Copy " , true ) ;
wstring copyVerbatim = pNativeSpeaker - > getNativeLangMenuString ( IDM_EDIT_COPY , L " Copy " , true ) ;
copyVerbatim + = L " \t Ctrl+C " ;
copyVerbatim + = L " \t Ctrl+C " ;
wstring copyPaths = pNativeSpeaker - > getLocalizedStrFromID ( " finder-copy-paths " , L " Copy Selected Pathname(s) " ) ;
wstring copyPaths = pNativeSpeaker - > getLocalizedStrFromID ( " finder-copy-selected- paths " , L " Copy Selected Pathname(s) " ) ;
wstring selectAll = pNativeSpeaker - > getNativeLangMenuString ( IDM_EDIT_SELECTALL , L " Select all " , true ) ;
wstring selectAll = pNativeSpeaker - > getNativeLangMenuString ( IDM_EDIT_SELECTALL , L " Select all " , true ) ;
selectAll + = L " \t Ctrl+A " ;
selectAll + = L " \t Ctrl+A " ;
wstring clearAll = pNativeSpeaker - > getLocalizedStrFromID ( " finder-clear-all " , L " Clear all " ) ;
wstring clearAll = pNativeSpeaker - > getLocalizedStrFromID ( " finder-clear-all " , L " Clear all " ) ;
wstring purgeForEverySearch = pNativeSpeaker - > getLocalizedStrFromID ( " finder-purge-for-every-search " , L " Purge for every search " ) ;
wstring purgeForEverySearch = pNativeSpeaker - > getLocalizedStrFromID ( " finder-purge-for-every-search " , L " Purge for every search " ) ;
wstring openAll = pNativeSpeaker - > getLocalizedStrFromID ( " finder-open-all " , L " Open Selected Pathname(s) " ) ;
wstring openAll = pNativeSpeaker - > getLocalizedStrFromID ( " finder-open-selected-paths " , L " Open Selected Pathname(s) " ) ;
wstring wrapLongLines = pNativeSpeaker - > getLocalizedStrFromID ( " finder-wrap-long-lines " , L " Word wrap long lines " ) ;
wstring wrapLongLines = pNativeSpeaker - > getLocalizedStrFromID ( " finder-wrap-long-lines " , L " Word wrap long lines " ) ;
tmp . push_back ( MenuItemUnit ( NPPM_INTERNAL_FINDINFINDERDLG , findInFinder ) ) ;
tmp . push_back ( MenuItemUnit ( NPPM_INTERNAL_FINDINFINDERDLG , findInFinder ) ) ;