EControl Ltd. Forum Index EControl Ltd.
VCL libraries and software support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Can search results expand collapsed regions?

 
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor
View previous topic :: View next topic  
Author Message
mstaszew



Joined: 21 Jul 2006
Posts: 67
Location: North Carolina, USA

PostPosted: Fri Feb 08, 2008 4:54 pm    Post subject: Can search results expand collapsed regions? Reply with quote

If I do a find and the find result is within a collapsed region, the region does not expand. Is there a setting that will allow the collapsed region to expand to show the find result?

Thanks in advance.
Back to top
View user's profile Send private message
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Sat Feb 09, 2008 8:38 am    Post subject: Reply with quote

Fix (ecSyntDlg.pas):

Code:
procedure TSyntFindDialog.ShowSearchRes(Pos, Count: integer; ToBack: Boolean);
var cng_PS: Boolean;
    p: TPoint;
begin
  with FControl do
   begin
    cng_PS := FKeepSelection and not (soPersistentBlocks in Options);
    if cng_PS then
      Options := Options + [soPersistentBlocks];
    try
      if ToBack
        then p := StrPosToCaretPos(Pos - 1)
        else p := StrPosToCaretPos(Pos + Count - 1);
      ShowLine(p.Y);
      CaretPos := p;
      if FSelectResult
        then SetSelection(Pos - 1, Count)
        else SetSearchMark(Pos - 1, Count);
      if not Focused then SetFocus;
    finally
      if cng_PS then
        Options := Options - [soPersistentBlocks];
    end;
   end;
end;


Michael.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group