Revision: 13666
http://sourceforge.net/p/skim-app/code/13666
Author: hofman
Date: 2023-09-14 22:45:09 +0000 (Thu, 14 Sep 2023)
Log Message:
-----------
let displayline script get document from the path to make sure it works on the
correct document. Apparently sometimes the document is not properly equal to
document 1.
Modified Paths:
--------------
trunk/displayline
Modified: trunk/displayline
===================================================================
--- trunk/displayline 2023-09-11 21:43:02 UTC (rev 13665)
+++ trunk/displayline 2023-09-14 22:45:09 UTC (rev 13666)
@@ -25,7 +25,6 @@
while [[ "${1:0:1}" == "-" ]]; do
if [[ "$1" == "-r" || "$1" == "-revert" ]]; then
revert="try
- set thePath to POSIX path of (theFile as alias)
set theDocs to get documents whose path is thePath
if (count of theDocs) > 0 then revert theDocs
end try"
@@ -56,10 +55,14 @@
# run AppleScript
/usr/bin/osascript << EOF
set theFile to POSIX file "${file}"
+ set thePath to POSIX path of (theFile as alias)
tell application "Skim"
${revert}
open theFile
- go document 1 to TeX line ${line} ${from_source} ${reading_bar}
${no_select}
- $activate
+ set theDocs to get documents whose path is thePath
+ if (count of theDocs) = 0 then set theDocs to {document 1}
+ set theDoc to contents of item 1 of theDocs
+ go theDoc to TeX line ${line} ${from_source} ${reading_bar} ${no_select}
+ ${activate}
end tell
EOF
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit