View previous topic :: View next topic |
Author |
Message |
mstaszew
Joined: 21 Jul 2006 Posts: 67 Location: North Carolina, USA
|
Posted: Fri Feb 08, 2008 4:54 pm Post subject: Can search results expand collapsed regions? |
|
|
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 |
|
|
econtrol Site Admin
Joined: 09 Jun 2006 Posts: 202
|
Posted: Sat Feb 09, 2008 8:38 am Post subject: |
|
|
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 |
|
|
|