Revision: 7516
http://skim-app.svn.sourceforge.net/skim-app/?rev=7516&view=rev
Author: hofman
Date: 2011-10-13 11:41:50 +0000 (Thu, 13 Oct 2011)
Log Message:
-----------
smarter backup way of finding source file for synctex
Modified Paths:
--------------
trunk/SKPDFSynchronizerServer.m
Modified: trunk/SKPDFSynchronizerServer.m
===================================================================
--- trunk/SKPDFSynchronizerServer.m 2011-10-12 18:40:24 UTC (rev 7515)
+++ trunk/SKPDFSynchronizerServer.m 2011-10-13 11:41:50 UTC (rev 7516)
@@ -574,7 +574,17 @@
- (BOOL)synctexFindPage:(NSUInteger *)pageIndexPtr location:(NSPoint
*)pointPtr forLine:(NSInteger)line inFile:(NSString *)file {
BOOL rv = NO;
- NSString *filename = [filenames objectForKey:file] ?: [file
lastPathComponent];
+ NSString *filename = [filenames objectForKey:file] ?: [filenames
objectForKey:[[file stringByResolvingSymlinksInPath]
stringByStandardizingPath]];
+ if (filename == nil) {
+ for (NSString *fn in filenames) {
+ if ([[fn lastPathComponent] caseInsensitiveCompare:[file
lastPathComponent]] == NSOrderedSame) {
+ filename = [filenames objectForKey:file];
+ break;
+ }
+ }
+ if (filename == nil)
+ filename = [file lastPathComponent];
+ }
if (synctex_display_query(scanner, [filename fileSystemRepresentation],
(int)line + 1, 0) > 0) {
synctex_node_t node = synctex_next_result(scanner);
if (node) {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit