Skip to content

Commit

Permalink
Fix opening help files + anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
humdingerb committed Aug 1, 2024
1 parent 1d00e0d commit 85679f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,13 @@ openDocumentation(const char* helpfilename, const char* anchor = NULL)
{
entry_ref ref = getHelpFile(helpfilename);
BPath path(&ref);
path.Append(anchor);
BString url;
url << "file://" << path.Path();
if (anchor != NULL)
url << anchor;

BMessage message(B_REFS_RECEIVED);
message.AddString("url", path.Path());
message.AddString("url", url.String());
be_roster->Launch("text/html", &message);
}

Expand Down

0 comments on commit 85679f3

Please sign in to comment.