summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-28 13:55:49 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2009-10-28 13:55:49 +0200
commit546b9a369101d3cb28fb8fab3abe065e9de3e598 (patch)
tree27e57a928d0166c5983568842367b304fee3f96a /src
parent98f60539d21d84f2541039a16a846ffe99cfc1eb (diff)
downloadfpGUI-546b9a369101d3cb28fb8fab3abe065e9de3e598.tar.xz
Adds support for highlighting searched words after a search.
Signed-off-by: Graeme Geldenhuys <graeme@mastermaths.co.za>
Diffstat (limited to 'src')
-rw-r--r--src/frm_main.pas14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/frm_main.pas b/src/frm_main.pas
index 7924fae8..310c458e 100644
--- a/src/frm_main.pas
+++ b/src/frm_main.pas
@@ -1370,6 +1370,8 @@ var
Link: THelpLink;
HelpFile: THelpFile;
Topic: TTopic;
+ HighlightWordSequences: TList;
+ FileIndex: integer;
Begin
ProfileEvent('DisplayTopic >>>>');
if ATopic = nil then
@@ -1425,12 +1427,22 @@ Begin
if HelpFile.HighlightWords <> nil then
ProfileEvent('highlightwords is ok');
+
+ if (AllFilesWordSequences.Count > 0) // ie we have done a search...
+ {and ViewHighlightSearchWordsMI.Checked} then
+ begin
+ FileIndex := CurrentOpenFiles.IndexOf( HelpFile );
+ HighlightWordSequences := TList(AllFilesWordSequences[ FileIndex ]);
+ end
+ else
+ HighlightWordSequences := nil;
+
lText := '';
ProfileEvent('Debug show hex values = ' + BoolToStr(Debug));
if ImageIndices <> nil then
ProfileEvent('ImageIndices initialized');
- CurrentTopic.GetText( nil {HighlightWordSequences},
+ CurrentTopic.GetText( HighlightWordSequences,
Debug {ShowCodes},
False {ShowWordIndices},
lText {TopicText},