From ee071770c60546f1e50008ab4d5938efab9f3869 Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 7 May 2011 16:33:54 +0000 Subject: [PATCH] IDE: find in files: search in virtual files, bug #19249 git-svn-id: trunk@30602 - --- ide/searchfrm.pas | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ide/searchfrm.pas b/ide/searchfrm.pas index bdadf9121b..ea90ce70f0 100644 --- a/ide/searchfrm.pas +++ b/ide/searchfrm.pas @@ -484,6 +484,8 @@ var NewMatchEndPos: PtrInt; Lines: String; begin + //debugln(['SearchInText TheFileName=',TheFileName,' SearchFor=',SearchFor,'" ReplaceText=',ReplaceText,'"']); + if (Progress<>nil) and Progress.Abort then exit(mrAbort); Result:=mrOk; @@ -691,7 +693,7 @@ begin end;//GetOptions function TSearchProgressForm.DoSearch: integer; -// Search the text and then return the number of found items. +// Search in all files and then return the number of found items. begin Result:= 0; PromptOnReplace:=true; @@ -930,11 +932,11 @@ begin begin //only if file exists on disk SrcEdit := SourceEditorManagerIntf.UniqueSourceEditors[i]; - if FilenameIsAbsolute(SrcEdit.FileName) and - FileExistsCached(SrcEdit.FileName) then - begin - TheFileList.Add(SrcEdit.FileName); - end; + if FilenameIsAbsolute(SrcEdit.FileName) + and (not FileExistsCached(SrcEdit.FileName)) + then + continue; + TheFileList.Add(SrcEdit.FileName); end; SearchFileList:= TheFileList; DoSearchAndAddToSearchResults;