Revision: 9174 http://sourceforge.net/p/skim-app/code/9174 Author: hofman Date: 2016-10-17 14:20:28 +0000 (Mon, 17 Oct 2016) Log Message: ----------- don't pass tex source file to applescript command when no source file was passed in display line script, let the synchronizer find the source
Modified Paths: -------------- trunk/displayline Modified: trunk/displayline =================================================================== --- trunk/displayline 2016-10-15 20:42:51 UTC (rev 9173) +++ trunk/displayline 2016-10-17 14:20:28 UTC (rev 9174) @@ -30,17 +30,16 @@ line=$1 file="$2" shopt -s extglob -[[ $# -gt 2 ]] && source="$3" || source="${file%.@(pdf|dvi|xdv)}.tex" +[[ $# -gt 2 ]] && source="$3" || source="" # expand relative paths [[ "${file:0:1}" == "/" ]] || file="${PWD}/${file}" -[[ "${source:0:1}" == "/" ]] || source="${PWD}/${source}" +[[ "${source}" == "" || "${source:0:1}" == "/" ]] || source="${PWD}/${source}" # run AppleScript /usr/bin/osascript << EOF set theLine to $line as integer set theFile to POSIX file "$file" - set theSource to POSIX file "$source" set thePath to POSIX path of (theFile as alias) tell application "Skim" if $activate then activate @@ -51,6 +50,11 @@ end try end if open theFile - tell front document to go to TeX line theLine from theSource showing reading bar $bar + if "$source" is "" then + tell front document to go to TeX line theLine showing reading bar $bar + else + set theSource to POSIX file "$source" + tell front document to go to TeX line theLine from theSource showing reading bar $bar + end if end tell EOF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit