From 47ea4a4ac4c752790709c9d42a75e558137b273d Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 18 May 2011 18:59:55 +0000 Subject: [PATCH] chmhelp: fixed lazarus dir git-svn-id: trunk@30802 - --- components/chmhelp/packages/idehelp/chmlangref.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/chmhelp/packages/idehelp/chmlangref.pas b/components/chmhelp/packages/idehelp/chmlangref.pas index d2a3ca9a3e..43f4be0966 100644 --- a/components/chmhelp/packages/idehelp/chmlangref.pas +++ b/components/chmhelp/packages/idehelp/chmlangref.pas @@ -78,8 +78,9 @@ procedure TLangRefHelpDatabase.LoadKeywordList(Path: string); begin if Path = '' then begin - Path := { TODO : FixSlash }('$(LazarusDir)/docs/html/'); + Path := '$(LazarusDir)'; IDEMacros.SubstituteMacros(Path); + Path := AppendPathDelim(Path) + 'docs' + PathDelim + 'html'; end; Path := AppendPathDelim(Path); @@ -122,6 +123,7 @@ begin if SameText(KeyWord, 'for') or SameText(KeyWord, 'in') then begin i := FKeyWordsList.IndexOfName('forin'); + if i < 0 then Exit; KeywordNode := THelpNode.CreateURL(Self,KeyWord,'ref.chm://ref/' + FKeyWordsList.ValueFromIndex[i]); KeywordNode.Title := 'Pascal keyword "for..in"'; FKeywordNodes.Add(KeywordNode);