Explorar o código

+ Implement Topic Search

git-svn-id: trunk@5922 -
pierre %!s(int64=18) %!d(string=hai) anos
pai
achega
1724a37358
Modificáronse 1 ficheiros con 20 adicións e 0 borrados
  1. 20 0
      ide/fpmhelp.inc

+ 20 - 0
ide/fpmhelp.inc

@@ -32,9 +32,29 @@ begin
 end;
 
 procedure TIDEApp.HelpTopicSearch;
+var FileID: word;
+    Ctx   : THelpCtx;
+var Found: boolean;
+var
+    EditorWindow : PSourceWindow;
+    S : string;
 begin
+  EditorWindow:=FirstEditorWindow;
+  If assigned(EditorWindow) then
+    S:=LowerCaseStr(EditorWindow^.Editor^.GetCurrentWord)
+  else
+    S:='';
+  CheckHelpSystem;
+  Found:=false;
+  if S<>'' then
+    Found:=HelpFacility^.TopicSearch(S,FileID,Ctx);
+  if Found then
+     Help(FileID,Ctx,false)
+  else
+     HelpIndex('');
 end;
 
+
 procedure TIDEApp.HelpPrevTopic;
 begin
   if HelpWindow=nil then HelpContents else