Skip to content
Next Next commit
Now passing the full file path to the Javascript "showFile" method, so
we can use the file suffix to determine which syntax highlighting to use.
  • Loading branch information
suranyami committed Nov 24, 2010
commit 14a1b611bead14458336cf12a0862c928a429a7b
5 changes: 3 additions & 2 deletions GLFileView.m
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ - (void) showFile
if ([files count]>0) {
PBGitTree *file=[files objectAtIndex:0];

NSString *fileTxt=@"";
NSString *fileTxt = @"";
if(startFile==@"fileview")
fileTxt=[self parseHTML:[file textContents]];
else if(startFile==@"blame")
Expand All @@ -86,7 +86,8 @@ - (void) showFile
fileTxt=[file log:logFormat];

id script = [view windowScriptObject];
[script callWebScriptMethod:@"showFile" withArguments:[NSArray arrayWithObject:fileTxt]];
NSString *filePath = [file fullPath];
[script callWebScriptMethod:@"showFile" withArguments:[NSArray arrayWithObjects:fileTxt, filePath, nil]];
}

#if 0
Expand Down